home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / ng / ngperl10 / src / language.dat < prev    next >
Text File  |  1993-02-27  |  79KB  |  2,550 lines

  1. eat
  2.     Color := RandColor;
  3.     SetColor(Color);
  4.     SetFillStyle(Random(CloseDotFill)+1, Color);
  5.     Bar3D(Random(MaxWidth), Random(MaxHeight),
  6.           Random(MaxWidth), Random(MaxHeight), 0, TopOff);
  7.   until KeyPressed;
  8.   WaitToGo;
  9. end; { RandBarPlay }
  10.  
  11. procedure ArcPlay;
  12. { Draw random arcs on the screen }
  13. var
  14.   MaxRadius : word;
  15.   EndAngle : word;
  16.   ArcInfo : ArcCoordsType;
  17. begin
  18.   MainWindow('Arc / GetArcCoords demonstration');
  19.   StatusLine('Esc aborts or press a key');
  20.   MaxRadius := MaxY div 10;
  21.   repeat
  22.     SetColor(RandColor);
  23.     EndAngle := Random(360);
  24.     SetLineStyle(SolidLn, 0, NormWidth);
  25.     Arc(Random(MaxX), Random(MaxY), Random(EndAngle), EndAngle, Random(MaxRadius));
  26.     GetArcCoords(ArcInfo);
  27.     with ArcInfo do
  28.     begin
  29.       Line(X, Y, XStart, YStart);
  30.       Line(X, Y, Xend, Yend);
  31.     end;
  32.   until KeyPressed;
  33.   WaitToGo;
  34. end; { ArcPlay }
  35.  
  36. procedure PutPixelPlay;
  37. { Demonstrate the PutPixel and GetPixel commands }
  38. const
  39.   Seed   = 1962; { A seed for the random number generator }
  40.   NumPts = 2000; { The number of pixels plotted }
  41.   Esc    = #27;
  42. var
  43.   I : word;
  44.   X, Y, Color : word;
  45.   XMax, YMax  : integer;
  46.   ViewInfo    : ViewPortType;
  47. begin
  48.   MainWindow('PutPixel / GetPixel demonstration');
  49.   StatusLine('Esc aborts or press a key...');
  50.  
  51.   GetViewSettings(ViewInfo);
  52.   with ViewInfo do
  53.   begin
  54.     XMax := (x2-x1-1);
  55.     YMax := (y2-y1-1);
  56.   end;
  57.  
  58.   while not KeyPressed do
  59.   begin
  60.     { Plot random pixels }
  61.     RandSeed := Seed;
  62.     I := 0;
  63.     while (not KeyPressed) and (I < NumPts) do
  64.     begin
  65.       Inc(I);
  66.         PutPixel(Random(XMax)+1, Random(YMax)+1, RandColor);
  67.     end;
  68.  
  69.     { Erase pixels }
  70.     RandSeed := Seed;
  71.     I := 0;
  72.     while (not KeyPressed) and (I < NumPts) do
  73.     begin
  74.       Inc(I);
  75.       X := Random(XMax)+1;
  76.       Y := Random(YMax)+1;
  77.       Color := GetPixel(X, Y);
  78.         if Color = RandColor then
  79.           PutPixel(X, Y, 0);
  80.      end;
  81.   end;
  82.   WaitToGo;
  83. end; { PutPixelPlay }
  84.  
  85. procedure PutImagePlay;
  86. { Demonstrate the GetImage and PutImage commands }
  87.  
  88. const
  89.   r  = 20;
  90.   StartX = 100;
  91.   StartY = 50;
  92.  
  93. var
  94.   CurPort : ViewPortType;
  95.  
  96. procedure MoveSaucer(var X, Y : integer; Width, Height : integer);
  97. var
  98.   Step : integer;
  99. begin
  100.   Step := Random(2*r);
  101.   if Odd(Step) then
  102.     Step := -Step;
  103.   X := X + Step;
  104.   Step := Random(r);
  105.   if Odd(Step) then
  106.     Step := -Step;
  107.   Y := Y + Step;
  108.  
  109.   { Make saucer bounce off viewport walls }
  110.   with CurPort do
  111.   begin
  112.     if (x1 + X + Width - 1 > x2) then
  113.       X := x2-x1 - Width + 1
  114.     else
  115.       if (X < 0) then
  116.         X := 0;
  117.     if (y1 + Y + Height - 1 > y2) then
  118.       Y := y2-y1 - Height + 1
  119.     else
  120.       if (Y < 0) then
  121.         Y := 0;
  122.   end;
  123. end; { MoveSaucer }
  124.  
  125. var
  126.   Pausetime : word;
  127.   Saucer    : pointer;
  128.   X, Y      : integer;
  129.   ulx, uly  : word;
  130.   lrx, lry  : word;
  131.   Size      : word;
  132.   I         : word;
  133. begin
  134.   ClearDevice;
  135.   FullPort;
  136.  
  137.   { PaintScreen }
  138.   ClearDevice;
  139.   MainWindow('GetImage / PutImage Demonstration');
  140.   StatusLine('Esc aborts or press a key...');
  141.   GetViewSettings(CurPort);
  142.  
  143.   { DrawSaucer }
  144.   Ellipse(StartX, StartY, 0, 360, r, (r div 3)+2);
  145.   Ellipse(StartX, StartY-4, 190, 357, r, r div 3);
  146.   Line(StartX+7, StartY-6, StartX+10, StartY-12);
  147.   Circle(StartX+10, StartY-12, 2);
  148.   Line(StartX-7, StartY-6, StartX-10, StartY-12);
  149.   Circle(StartX-10, StartY-12, 2);
  150.   SetFillStyle(SolidFill, MaxColor);
  151.   FloodFill(StartX+1, StartY+4, GetColor);
  152.  
  153.   { ReadSaucerImage }
  154.   ulx := StartX-(r+1);
  155.   uly := StartY-14;
  156.   lrx := StartX+(r+1);
  157.   lry := StartY+(r div 3)+3;
  158.  
  159.   Size := ImageSize(ulx, uly, lrx, lry);
  160.   GetMem(Saucer, Size);
  161.   GetImage(ulx, uly, lrx, lry, Saucer^);
  162. {  PutImage(ulx, uly, Saucer^, XORput);               { erase image }
  163.  
  164.   { Plot some "stars" }
  165.   for I := 1 to 1000 do
  166.      PutPixel(Random(MaxX), Random(MaxY), RandColor);
  167.   X := MaxX div 2;
  168.   Y := MaxY div 2;
  169.   PauseTime := 70;
  170.  
  171.   { Move the saucer around }
  172.   repeat
  173. {     PutImage(X, Y, Saucer^, XORput);                 { draw image }
  174.      Delay(PauseTime);
  175. {     PutImage(X, Y, Saucer^, XORput);                 { erase image }
  176.      MoveSaucer(X, Y, lrx - ulx + 1, lry - uly + 1);  { width/height }
  177.   until KeyPressed;
  178.   FreeMem(Saucer, size);
  179.   WaitToGo;
  180. end; { PutImagePlay }
  181.  
  182. procedure PolyPlay;
  183. { Draw random polygons with random fill styles on the screen }
  184. const
  185.   MaxPts = 5;
  186. type
  187.   PolygonType = array[1..MaxPts] of PointType;
  188. var
  189.   Poly : PolygonType;
  190.   I, Color : word;
  191. begin
  192.   MainWindow('FillPoly demonstration');
  193.   StatusLine('Esc aborts or press a key...');
  194.   repeat
  195.     Color := RandColor;
  196.     SetFillStyle(Random(11)+1, Color);
  197.     SetColor(Color);
  198.     for I := 1 to MaxPts do
  199.       with Poly[I] do
  200.       begin
  201.         X := Random(MaxX);
  202.         Y := Random(MaxY);
  203.       end;
  204.     FillPoly(MaxPts, Poly);
  205.   until KeyPressed;
  206.   WaitToGo;
  207. end; { PolyPlay }
  208.  
  209. procedure FillStylePlay;
  210. { Display all of the predefined fill styles available }
  211. var
  212.   Style    : word;
  213.   Width    : word;
  214.   Height   : word;
  215.   X, Y     : word;
  216.   I, J     : word;
  217.   ViewInfo : ViewPortType;
  218.  
  219. procedure DrawBox(X, Y : word);
  220. begin
  221.   SetFillStyle(Style, MaxColor);
  222.   with ViewInfo do
  223.     Bar(X, Y, X+Width, Y+Height);
  224.   Rectangle(X, Y, X+Width, Y+Height);
  225.   OutTextXY(X+(Width div 2), Y+Height+4, Int2Str(Style));
  226.   Inc(Style);
  227. end; { DrawBox }
  228.  
  229. begin
  230.   MainWindow('Pre-defined fill styles');
  231.   GetViewSettings(ViewInfo);
  232.   with ViewInfo do
  233.   begin
  234.     Width := 2 * ((x2+1) div 13);
  235.     Height := 2 * ((y2-10) div 10);
  236.   end;
  237.   X := Width div 2;
  238.   Y := Height div 2;
  239.   Style := 0;
  240.   for J := 1 to 3 do
  241.   begin
  242.     for I := 1 to 4 do
  243.     begin
  244.       DrawBox(X, Y);
  245.       Inc(X, (Width div 2) * 3);
  246.     end;
  247.     X := Width div 2;
  248.     Inc(Y, (Height div 2) * 3);
  249.   end;
  250.   SetTextJustify(LeftText, TopText);
  251.   WaitToGo;
  252. end; { FillStylePlay }
  253.  
  254. procedure FillPatternPlay;
  255. { Display some user defined fill patterns }
  256. const
  257.   Patterns : array[0..11] of FillPatternType = (
  258.   ($AA, $55, $AA, $55, $AA, $55, $AA, $55 üÖü üÖü  !BBäx!!!BBäx!BBäx"""DDêp""DDêp>"""BBääêp""!"BDäêêp>IÉÆ|      ° @≥î>00>><Dêx  !BBäx""DDêp&<"DDêê&22TTêêê$> $< @äêp>          ⁿBBBB<  @@Ç****DDDDDDDU¬U¬U¬U¬U¬U¬U¬▌w▌w▌w▌w▌w▌w▌w°°°≥■°°≥≥■≥≥■■°°°    ≤  ≤  ≤≤         °                     ≡≡≡≡≡≡≡≡≡≡≡≡≡≡       ;DDD;    $"Bdÿ>@@@>||>Ac]AAA1N"A""2,  `1NA"*III*<Bü üB<<BüüüB<A" \"QIE" < <BBBB  @@    ~ ?  @ÇB$$B ""A$$"AII6 üBr»$**IIII**ccregion.  The region is defined as any pixel of
  259.             OldColor which has a path of pixels of OldColor or NewColor
  260.             with sides touching back to the seed point, (XSeed, YSeed).
  261.             Therefore, only pixels of OldColor are modified and no other
  262.             information is changed.
  263.  
  264.             SEE ALSO
  265.  
  266.             DRWFILLBOX, DRWFILLCIRCLE, DRWFILLELLIPSE, FILLAREA,
  267.             FILLCONVEXPOLY, FILLPAGE, FILLPOLY, FILLSCREEN, FILLVIEW,
  268.             SETVIEW
  269.  
  270.             EXAMPL(HNxHHO$B<BBBB<$<BBBB<<BBBB<$BBBBBF:0BBBBF:$BBBF:B<""AAA""AAAAA"<B@@B<" <2\A">>xDDxDNDD <` <>BB= > <BBBB< BBBBF:2L\bBBBB&AaQIECA8$>""">0@@A>@@@ b$(. b$(*
  271.     $    $    $DDDDDDD¬U¬U¬U¬U¬U¬U¬Uw▌w▌w▌w▌w▌w▌w▌°°°⌠ⁿ°°⌠⌠ⁿ⌠⌠ⁿⁿ°°°    ≈  ≈  ≈≈         °                     ≡≡≡≡≡≡≡≡≡≡≡≡≡≡       7HH7"B\DBBRL~BB@@@@@@?R~!!~?DDDD8BBBB|@@Ç>P>III>"AA""AAA"Uw<DDDD86II6"EIQ"\ @@ "AAAAA> >     hH02L2L$$<H(,$<>>>>>>>         VMODE=VIDEOMODEGET
  272.             IF WHICHVGA = 0 THEN STOP
  273.             DUMMY=RES640
  274.             SETVIEW 100, 100, 539, 379
  275.             FILLVIEW 10
  276.             WHILE INKEY$ = ""
  277.             WEND
  278.             VIDEOMODESET VMODE
  279.             END
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.                                                                          63
  297.  
  298.  
  299.  
  300.  
  301.  
  302.           FONTGETINFO
  303.  
  304.             PROTOTYPE
  305.  
  306.             SUB FONTGETINFO (Width%, Height%)
  307.  
  308.             INPUT
  309.  
  310.             no input parameters
  311.     WEND
  312.             MOUSEEXIT
  313.             VIDEOMODESET VMODE
  314.             END
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.                                                                          86
  356.  
  357.  
  358.  
  359.  
  360.  
  361.           MOUSECURSORDEFAULT
  362.  
  363.             PROTOTYPE
  364.  
  365.             SUB MOUSECURSORDEFAULT ()
  366.  
  367.             INPUT
  368.  
  369.             no input parameters
  370.  
  371.             OUTPUT
  372.  
  373.             no value returned
  374.  
  375.             USAGE
  376.  
  377.             MOUSECURSORDEFAULT defines the mouse cursor to be a small
  378.        ,K$╖┼╘╤░XQ)σ┤ö≡÷┴─┤àñT┘,╘¬àñX9╘⌠àñ\9╘UÜ╢≤`9╘4a╘d9╘UTa╘h9╘ta╘l9╘Uöa╘p9╘┤a╘t┘PT±x┴îÇ╖0▓ïα│ÅαU┤ôα╡ùα╢¢α╖úΓ╘pǺΓ╕¡αë ╚┴πì°sKÉφb<$⌡▌ë     φë φë I1φë  Eφë $YφÆë (mφë ,üφë 0$òφë á⌐φë ñ╜φë I¿╤φë ¼σφë ░∙φÆë 4²ë ┤!²ë ╕$5²ë ╝I²ë └]²ë ⌐8q²ë <àⁿΦiǬ∙PÖÇ ¥Ç
  379. ⁿ░╨â@%8@ΓΦá╝╤░≡cÑÅ*$░╕≡ż≡τ╥m¿⌡ε    ╨@#µ≈$âh$âαra╨à`¥è∩Ç%Ç +─▀ TîcOî∩â°1<@  [$¿Ç¼ MMl·0ƒ Y¼─!%6a▐è ¥ì ßá+?±  P<îaTTV ╪iÇ¡≥░ `_ñ»%Çá᪠P█º»ε`éa∙É%H«┴íA%Gár∙É
  380. iw∙Éiφ`╧≥≡╤Çmⁿ▒
  381. ]ÆAáσw7░⌡∩    $·╟Ç√É&^`  ┐ $ⁿ  $■ $╒ nk$J-ÉQ1£PéBù »0αQ/Ñ4╜£░ºP≈Ñ4Ç⌡$(ª▀$@C]Æé≈└╕_SÇçÑ4=iÉ⌠ä╣<_np@Ñ45ò▒Y3ü¼Qí░.i>╠@5+┴╙É╛╙$@ #┴@«╦
  382. $╤
  383. #@Ñú4,p&e÷ü¼_ÇQºÑ4òQ  ü@;¡_áQ@e╠≥@mp!┤a╘O░√`Pñź ÇT°8ÿ!¼Åñ$½╙"q¿ PñCÇ¿α√└╥░eT"ß<p°%Pæ(╧%pδ¥/OêW0Ǽbφ φ B@[â¼8â≥µ≤(    ¿⌡%(Ç∩áTÿp+ óÜ▓0!Σ±(1±░┤ÖÇD└D0Å╡`   $ «îO@╧1
  384. a╝╤j-0ñ│`@╖bΦaT1═⌠╝╤Σ²¼±,1öíî9lÿ28ÇÅ`Γî¿P²$,N0┴O0a╫δ≤0σú`°î╖#0δ≡└X▄1»Σî(▒¥Ç█Ñ"qá√1CÇú╟╨º Å
  385. FT Θ²î└1ÇY0    w ²à░$@AÅ`╦Φ¼╘`▄1A  }┐Ç*5 ΩSδδî`¼îaδæ¼î5 1¿⌡Ω╜⌠ ¼¥╬ü└Qî1S╛≤î9╨iÇ,∙PU(}Ç$üÇ àÇ`σìÇ`QαÜBO$%ÿÇ╧"$Ç«Ç]É.┬\`%WÉ$  W0 ÄâO0]αG┬ur╩░£▒Q¢ú╔Ç≡°s?`X0╘`@ µWâ@╣aá εdq`¥9?Ç&+o0µyÄΣAÅuV(7P╬±@IdQ╕@Å┤@;Ç▓?Çò│CÇ┤╟╨╡KÇÄ30ⁿφ° ó╬ì+]Ä╦≡     Mö╝σ ²y5<!└▀óâ╝É3~mp    $<╛≤9Æ-2ⁿ≡@T,╞Σa,)Pæ└¥#¼╪Q┤S(¼@Aîa≡╤@Ö²±⌠KëD─┴▒▀0╨Ñ$╩-0 ╨ê*╙▓edm`î=3Kß-10è=≥≤²└£mîjy ÿe²ⁿ╨i╕e▓ΣmαÖ╢C%Ç*ê*0 EátQZ`mÄLP%    °üⁿªüNQ∙  T¿<qtWΩc z░ÅÇñΩçǪçÇ«;└<┐á¼¥. á?<Σscî)áí := 0;
  386.       end;
  387.     end;
  388.   end;
  389.   WaitToGo;
  390. end; { UserLineStylePlay }
  391.  
  392.  
  393. procedure SayGoodbye;
  394. { Say goodbye and then exit the program }
  395. var
  396.   ViewInfo : ViewPortType;
  397. begin
  398.   MainWindow('');
  399.   GetViewSettings(ViewInfo);
  400.   SetTextStyle(TriplexFont, HorizDir, 4);
  401.   SetTextJustify(CenterText, CenterText);
  402.   with ViewInfo do
  403.     OutTextXY((x2-x1) div 2, (y2-y1) div 2, 'That''s all folks!');
  404.   StatusLine('Press any key to quit...');
  405.   repeat until KeyPressed;
  406. end; { SayGoodbye }
  407.  
  408.  
  409. PROCEDURE SelectMode;
  410. VAR
  411.     choice1,choice2     : CHAR;
  412.    xsize,ysize            : WORD;
  413. BEGIN
  414.     (* Let's select a mode *)
  415.     ClrScr;
  416.     WriteLn('VESADEMO:');
  417.     WriteLn('1. 256 colors');
  418.     WriteLn('2. 32768 colors');
  419.     WriteLn('3. 65536 colors');
  420.     WriteLn('4. 16777216 colors');
  421.     WriteLn('Q uit');
  422.     WriteLn;
  423.     Write('Your choice: ');
  424.     REPEAT
  425.         ReadLn(choice1);
  426.       IF choice1 <> '1' THEN BEGIN
  427.           WriteLn('Sorry !');
  428.          WriteLn('This demo wasn''t written for more as 256 colors !');
  429.          WriteLn('You would only get a limited impression of the Hi-& TrueColor modes...');
  430.          WriteLn('Switching to 256 colors.');
  431.          choice1 := '1';
  432.       END;
  433.     UNTIL choice1 IN ['1'..'4','q'];
  434.     IF choice1 = 'q' THEN Halt;
  435.  
  436.     WriteLn;
  437.     WriteLn;
  438.     WriteLn('a. 320x200');
  439.     WriteLn('b. 640x480');
  440.     WriteLn('c. 800x600');
  441.     WriteLn('d. 1024x768');
  442.     WriteLn('e. 1280x1024');
  443.     WriteLn('Q uit');
  444.     WriteLn;
  445.     Write('Your choice: ');
  446.     REPEAT
  447.         ReadLn(choice2);
  448.     UNTIL choice2 IN ['a'..'e','q'];
  449.     IF choice2 = 'q' THEN Halt;
  450.  
  451.     CASE choice2 OF
  452.         'a' : BEGIN
  453.             xsize := 320;
  454.             ysize := 200;
  455.         END;
  456.         'b' : BEGIN
  457.             xsize := 640;
  458.             ysize := 480;
  459.         END;
  460.         'c' : BEGIN
  461.             xsize := 800;
  462.             ysize := 600;
  463.         END;
  464.         'd' : BEGIN
  465.             xsize := 1024;
  466.             ysize := 768;
  467.         END;
  468.         'e' : BEGIN
  469.             xsize := 1280;
  470.             ysize := 1024;
  471.         END;
  472.     END;
  473.     CASE choice1 OF
  474.         '1' : mode := FindVesaMode(xsize,ysize,8);
  475.         '2' : mode := FindVesaMode(xsize,ysize,15);
  476.         '3' : mode := FindVesaMode(xsize,ysize,16);
  477.         '4' : mode := FindVesaMode(xsize,ysize,24);
  478.     END;
  479.     IF mode = 0 THEN BEGIN
  480.         WriteLn('No such mode could be found !');
  481.         WriteLn('Switching to to 320x200.');
  482.         ReadKey;
  483.         mode := V320x200x256;
  484.     END;
  485. END;
  486.  
  487. begin { program body }
  488.   SelectMode;
  489.   Initialize;
  490.   ReportStatus;
  491.  
  492. {  AspectRatioPlay; }
  493.   FillEllipsePlay;
  494.   SectorPlay;
  495.   WriteModePlay;
  496.  
  497.   ColorPlay;
  498.   { PalettePlay only intended to work on these drivers: }
  499.   if (GraphDriver = EGA) or
  500.       (GraphDriver = EGA64) or
  501.       (GraphDriver = VGA) then
  502.      PalettePlay;
  503.   PutPixelPlay;
  504. {  PutImagePlay; }
  505.   RandBarPlay;
  506.   BarPlay;
  507.   Bar3DPlay;
  508.   ArcPlay;
  509.   CirclePlay;
  510.   PiePlay;
  511.   LineToPlay;
  512.   LineRelPlay;
  513. {  LineStylePlay; }
  514. {  UserLineStylePlay; }
  515.   TextDump;
  516.   TextPlay;
  517.   CrtModePlay;
  518.   FillStylePlay;
  519.   FillPatternPlay;
  520.   PolyPlay;
  521.   SayGoodbye;
  522. {  CloseGraph; }
  523.   CloseVesa;
  524. end.
  525. ***************************************************
  526.     '* SHOW D2ROTATE (ABOUT THE ORIGIN)
  527.     '****************************************************************∞╥≤c≤*φè#^│v/╒:j═φ0t+l▓ô"¬"g└≡?%ªêΣ│H╫½╫╜├¿U'╒⌐⌡ ßV?╩¬ujOΦçEZ1∞▐! ▄B╛Σ8║æ]1GlNÜ┐q▌▓;ô$ΦzE<cª*bEô#ä╧ñÅ"∩─LrdaÖ ╠º╫a^¥£å╬1~)@ëÖMδ╫0═6DäFê¬Çv┼ß╨kæpτ╪É)}ª 1w3╤╧ü⌡¥╓h▓╣≈ïÅaÑ[TⁿHqªÉ╝DKÄ─Y-∞tT╤Θ╨º╟╪.*ÇI9lΦ≈{πτcσ$τπßoFr╪╨∩┼╞╟;O2■e²LÜ4^N|╪½ÅO?╔°FOz`╟╟╟'<>>π$πΘù6·Xgî╖│°oîδπGƒd╝▀░?■╪╔_9L ⌡ôⁿq'æO▀ƒn4╔▀╚▄┼3pτ.òO°·}÷╕ⁿ±'æO?ít│!√8ßÑ≤/┐╣p┼≥┘E╦Vox╕cΦé5╟╚º╙$?√$≥ΘZεsî≡åìΓpKù¢ïß X╥ 9╞≈\µk┤O¥_ 5Üö\≤éÄ┌╤A[╤ÿáï┼éNⁿÅu16    g,%hc╙╨cD╨Vï┘R¢öKñR;8εáΣ╢╪ós╤π╡á└èxgzPÄMú╫yαºÉ+σJ¢i+▓â3╥    ═Ñ╙î^ºG▓█πérφçs %#(╗⌠?┼%u8≡6+QÉ))ò)Afw≈╣╪)B&4░åLXV:δät@Å.;5Φf╢Ät┐ΣJ╫─U8úÇ╟éö£╕p╔┴⌠vg╨╬╥é÷╪╣┬ΓI.ç≡^v╤ZΦÇ& ╒┌6ñô6XßNè╡╬E₧Ñ
  528. kIº╠▄A+╣╥éb²tæ-Y¡½αÑa═uuîÇ╢αêvhuª╡SÅ┤vèùú¥F;p<d⌐/F─d█éT%▓KΦû=q■öI┐ ┐╠6S$▒÷╚ENΩ¥Fû9╔┌R'╝ ╧φ└?g┬j▓0═/b╖₧─mûé╢┌»ÿÄë/·<éò■░╤╟╢├Xσ:╥P3Θ"╬Læsφ░┌öSö!╗¿*mN£WΣÇ£┤~#╗ææ≥RΩóh:à▌.æ≈╕▌v£äàd▒à╒├=░╖π║$howeg*╬    6ù▄ƒô╕φ░Ö╢qΘD>(w@úKεHÆ╛öúΣU
  529. éÜR╔╤W▄èê 2M%ó.▓SNÖA1ùJE╢║l]▓¿>\%└Å4ßO▄£â⌐& ê/)8vSP▀▓ôⁿææ√ü√ÑÄa⌠â╚4S╓╟P- ?Σá╕▓Næ*q╡UΘ▓≈^ñ·I.rúR&$Y^╚%è≡B┌≈Ceat
  530.     Color := RandColor;
  531.     SetColor(Color);
  532.     SetFillStyle(Random(CloseDotFill)+1, Color);
  533.     Bar3D(Random(MaxWidth), Random(MaxHeight),
  534.           Random(MaxWidth), Random(MaxHeight), 0, TopOff);
  535.   until KeyPressed;
  536.   WaitToGo;
  537. end; { RandBarPlay }
  538.  
  539. procedure ArcPlay;
  540. { Draw random arcs on the screen }
  541. var
  542.   MaxRadius : word;
  543.   EndAngle : word;
  544.   ArcInfo : ArcCoordsType;
  545. begin
  546.   MainWindow('Arc / GetArcCoords demonstration');
  547.   StatusLine('Esc aborts or press a key');
  548.   MaxRadius := MaxY div 10;
  549.   repeat
  550.     SetColor(RandColor);
  551.     EndAngle := Random(360);
  552.     SetLineStyle(SolidLn, 0, NormWidth);
  553.     Arc(Random(MaxX), Random(MaxY), Random(EndAngle), EndAngle, Random(MaxRadius));
  554.     GetArcCoords(ArcInfo);
  555.     with ArcInfo do
  556.     begin
  557.       Line(X, Y, XStart, YStart);
  558.       Line(X, Y, Xend, Yend);
  559.     end;
  560.   until KeyPressed;
  561.   WaitToGo;
  562. end; { ArcPlay }
  563.  
  564. procedure PutPixelPlay;
  565. { Demonstrate the PutPixel and GetPixel commands }
  566. const
  567.   Seed   = 1962; { A seed for the random number generator }
  568.   NumPts = 2000; { The number of pixels plotted }
  569.   Esc    = #27;
  570. var
  571.   I : word;
  572.   X, Y, Color : word;
  573.   XMax, YMax  : integer;
  574.   ViewInfo    : ViewPortType;
  575. begin
  576.   MainWindow('PutPixel / GetPixel demonstration');
  577.   StatusLine('Esc aborts or press a key...');
  578.  
  579.   GetViewSettings(ViewInfo);
  580.   with ViewInfo do
  581.   begin
  582.     XMax := (x2-x1-1);
  583.     YMax := (y2-y1-1);
  584.   end;
  585.  
  586.   while not KeyPressed do
  587.   begin
  588.     { Plot random pixels }
  589.     RandSeed := Seed;
  590.     I := 0;
  591.     while (not KeyPressed) and (I < NumPts) do
  592.     begin
  593.       Inc(I);
  594.         PutPixel(Random(XMax)+1, Random(YMax)+1, RandColor);
  595.     end;
  596.  
  597.     { Erase pixels }
  598.     RandSeed := Seed;
  599.     I := 0;
  600.     while (not KeyPressed) and (I < NumPts) do
  601.     begin
  602.       Inc(I);
  603.       X := Random(XMax)+1;
  604.       Y := Random(YMax)+1;
  605.       Color := GetPixel(X, Y);
  606.         if Color = RandColor then
  607.           PutPixel(X, Y, 0);
  608.      end;
  609.   end;
  610.   WaitToGo;
  611. end; { PutPixelPlay }
  612.  
  613. procedure PutImagePlay;
  614. { Demonstrate the GetImage and PutImage commands }
  615.  
  616. const
  617.   r  = 20;
  618.   StartX = 100;
  619.   StartY = 50;
  620.  
  621. var
  622.   CurPort : ViewPortType;
  623.  
  624. procedure MoveSaucer(var X, Y : integer; Width, Height : integer);
  625. var
  626.   Step : integer;
  627. begin
  628.   Step := Random(2*r);
  629.   if Odd(Step) then
  630.     Step := -Step;
  631.   X := X + Step;
  632.   Step := Random(r);
  633.   if Odd(Step) then
  634.     Step := -Step;
  635.   Y := Y + Step;
  636.  
  637.   { Make saucer bounce off viewport walls }
  638.   with CurPort do
  639.   begin
  640.     if (x1 + X + Width - 1 > x2) then
  641.       X := x2-x1 - Width + 1
  642.     else
  643.       if (X < 0) then
  644.         X := 0;
  645.     if (y1 + Y + Height - 1 > y2) then
  646.       Y := y2-y1 - Height + 1
  647.     else
  648.       if (Y < 0) then
  649.         Y := 0;
  650.   end;
  651. end; { MoveSaucer }
  652.  
  653. var
  654.   Pausetime : word;
  655.   Saucer    : pointer;
  656.   X, Y      : integer;
  657.   ulx, uly  : word;
  658.   lrx, lry  : word;
  659.   Size      : word;
  660.   I         : word;
  661. begin
  662.   ClearDevice;
  663.   FullPort;
  664.  
  665.   { PaintScreen }
  666.   ClearDevice;
  667.   MainWindow('GetImage / PutImage Demonstration');
  668.   StatusLine('Esc aborts or press a key...');
  669.   GetViewSettings(CurPort);
  670.  
  671.   { DrawSaucer }
  672.   Ellipse(StartX, StartY, 0, 360, r, (r div 3)+2);
  673.   Ellipse(StartX, StartY-4, 190, 357, r, r div 3);
  674.   Line(StartX+7, StartY-6, StartX+10, StartY-12);
  675.   Circle(StartX+10, StartY-12, 2);
  676.   Line(StartX-7, StartY-6, StartX-10, StartY-12);
  677.   Circle(StartX-10, StartY-12, 2);
  678.   SetFillStyle(SolidFill, MaxColor);
  679.   FloodFill(StartX+1, StartY+4, GetColor);
  680.  
  681.   { ReadSaucerImage }
  682.   ulx := StartX-(r+1);
  683.   uly := StartY-14;
  684.   lrx := StartX+(r+1);
  685.   lry := StartY+(r div 3)+3;
  686.  
  687.   Size := ImageSize(ulx, uly, lrx, lry);
  688.   GetMem(Saucer, Size);
  689.   GetImage(ulx, uly, lrx, lry, Saucer^);
  690. {  PutImage(ulx, uly, Saucer^, XORput);               { erase image }
  691.  
  692.   { Plot some "stars" }
  693.   for I := 1 to 1000 do
  694.      PutPixel(Random(MaxX), Random(MaxY), RandColor);
  695.   X := MaxX div 2;
  696.   Y := MaxY div 2;
  697.   PauseTime := 70;
  698.  
  699.   { Move the saucer around }
  700.   repeat
  701. {     PutImage(X, Y, Saucer^, XORput);                 { draw image }
  702.      Delay(PauseTime);
  703. {     PutImage(X, Y, Saucer^, XORput);                 { erase image }
  704.      MoveSaucer(X, Y, lrx - ulx + 1, lry - uly + 1);  { width/height }
  705.   until KeyPressed;
  706.   FreeMem(Saucer, size);
  707.   WaitToGo;
  708. end; { PutImagePlay }
  709.  
  710. procedure PolyPlay;
  711. { Draw random polygons with random fill styles on the screen }
  712. const
  713.   MaxPts = 5;
  714. type
  715.   PolygonType = array[1..MaxPts] of PointType;
  716. var
  717.   Poly : PolygonType;
  718.   I, Color : word;
  719. begin
  720.   MainWindow('FillPoly demonstration');
  721.   StatusLine('Esc aborts or press a key...');
  722.   repeat
  723.     Color := RandColor;
  724.     SetFillStyle(Random(11)+1, Color);
  725.     SetColor(Color);
  726.     for I := 1 to MaxPts do
  727.       with Poly[I] do
  728.       begin
  729.         X := Random(MaxX);
  730.         Y := Random(MaxY);
  731.       end;
  732.     FillPoly(MaxPts, Poly);
  733.   until KeyPressed;
  734.   WaitToGo;
  735. end; { PolyPlay }
  736.  
  737. procedure FillStylePlay;
  738. { Display all of the predefined fill styles available }
  739. var
  740.   Style    : word;
  741.   Width    : word;
  742.   Height   : word;
  743.   X, Y     : word;
  744.   I, J     : word;
  745.   ViewInfo : ViewPortType;
  746.  
  747. procedure DrawBox(X, Y : word);
  748. begin
  749.   SetFillStyle(Style, MaxColor);
  750.   with ViewInfo do
  751.     Bar(X, Y, X+Width, Y+Height);
  752.   Rectangle(X, Y, X+Width, Y+Height);
  753.   OutTextXY(X+(Width div 2), Y+Height+4, Int2Str(Style));
  754.   Inc(Style);
  755. end; { DrawBox }
  756.  
  757. begin
  758.   MainWindow('Pre-defined fill styles');
  759.   GetViewSettings(ViewInfo);
  760.   with ViewInfo do
  761.   begin
  762.     Width := 2 * ((x2+1) div 13);
  763.     Height := 2 * ((y2-10) div 10);
  764.   end;
  765.   X := Width div 2;
  766.   Y := Height div 2;
  767.   Style := 0;
  768.   for J := 1 to 3 do
  769.   begin
  770.     for I := 1 to 4 do
  771.     begin
  772.       DrawBox(X, Y);
  773.       Inc(X, (Width div 2) * 3);
  774.     end;
  775.     X := Width div 2;
  776.     Inc(Y, (Height div 2) * 3);
  777.   end;
  778.   SetTextJustify(LeftText, TopText);
  779.   WaitToGo;
  780. end; { FillStylePlay }
  781.  
  782. procedure FillPatternPlay;
  783. { Display some user defined fill patterns }
  784. const
  785.   Patterns : array[0..11] of FillPatternType = (
  786.   ($AA, $55, $AA, $55, $AA, $55, $AA, $55 üÖü üÖü  !BBäx!!!BBäx!BBäx"""DDêp""DDêp>"""BBääêp""!"BDäêêp>IÉÆ|      ° @≥î>00>><Dêx  !BBäx""DDêp&<"DDêê&22TTêêê$> $< @äêp>          ⁿBBBB<  @@Ç****DDDDDDDU¬U¬U¬U¬U¬U¬U¬▌w▌w▌w▌w▌w▌w▌w°°°≥■°°≥≥■≥≥■■°°°    ≤  ≤  ≤≤         °                     ≡≡≡≡≡≡≡≡≡≡≡≡≡≡       ;DDD;    $"Bdÿ>@@@>||>Ac]AAA1N"A""2,  `1NA"*III*<Bü üB<<BüüüB<A" \"QIE" < <BBBB  @@    ~ ?  @ÇB$$B ""A$$"AII6 üBr»$**IIII**ccregion.  The region is defined as any pixel of
  787.             OldColor which has a path of pixels of OldColor or NewColor
  788.             with sides touching back to the seed point, (XSeed, YSeed).
  789.             Therefore, only pixels of OldColor are modified and no other
  790.             information is changed.
  791.  
  792.             SEE ALSO
  793.  
  794.             DRWFILLBOX, DRWFILLCIRCLE, DRWFILLELLIPSE, FILLAREA,
  795.             FILLCONVEXPOLY, FILLPAGE, FILLPOLY, FILLSCREEN, FILLVIEW,
  796.             SETVIEW
  797.  
  798.             EXAMPL(HNxHHO$B<BBBB<$<BBBB<<BBBB<$BBBBBF:0BBBBF:$BBBF:B<""AAA""AAAAA"<B@@B<" <2\A">>xDDxDNDD <` <>BB= > <BBBB< BBBBF:2L\bBBBB&AaQIECA8$>""">0@@A>@@@ b$(. b$(*
  799.     $    $    $DDDDDDD¬U¬U¬U¬U¬U¬U¬Uw▌w▌w▌w▌w▌w▌w▌°°°⌠ⁿ°°⌠⌠ⁿ⌠⌠ⁿⁿ°°°    ≈  ≈  ≈≈         °                     ≡≡≡≡≡≡≡≡≡≡≡≡≡≡       7HH7"B\DBBRL~BB@@@@@@?R~!!~?DDDD8BBBB|@@Ç>P>III>"AA""AAA"Uw<DDDD86II6"EIQ"\ @@ "AAAAA> >     hH02L2L$$<H(,$<>>>>>>>         VMODE=VIDEOMODEGET
  800.             IF WHICHVGA = 0 THEN STOP
  801.             DUMMY=RES640
  802.             SETVIEW 100, 100, 539, 379
  803.             FILLVIEW 10
  804.             WHILE INKEY$ = ""
  805.             WEND
  806.             VIDEOMODESET VMODE
  807.             END
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.                                                                          63
  825.  
  826.  
  827.  
  828.  
  829.  
  830.           FONTGETINFO
  831.  
  832.             PROTOTYPE
  833.  
  834.             SUB FONTGETINFO (Width%, Height%)
  835.  
  836.             INPUT
  837.  
  838.             no input parameters
  839.     WEND
  840.             MOUSEEXIT
  841.             VIDEOMODESET VMODE
  842.             END
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.                                                                          86
  884.  
  885.  
  886.  
  887.  
  888.  
  889.           MOUSECURSORDEFAULT
  890.  
  891.             PROTOTYPE
  892.  
  893.             SUB MOUSECURSORDEFAULT ()
  894.  
  895.             INPUT
  896.  
  897.             no input parameters
  898.  
  899.             OUTPUT
  900.  
  901.             no value returned
  902.  
  903.             USAGE
  904.  
  905.             MOUSECURSORDEFAULT defines the mouse cursor to be a small
  906.        ,K$╖┼╘╤░XQ)σ┤ö≡÷┴─┤àñT┘,╘¬àñX9╘⌠àñ\9╘UÜ╢≤`9╘4a╘d9╘UTa╘h9╘ta╘l9╘Uöa╘p9╘┤a╘t┘PT±x┴îÇ╖0▓ïα│ÅαU┤ôα╡ùα╢¢α╖úΓ╘pǺΓ╕¡αë ╚┴πì°sKÉφb<$⌡▌ë     φë φë I1φë  Eφë $YφÆë (mφë ,üφë 0$òφë á⌐φë ñ╜φë I¿╤φë ¼σφë ░∙φÆë 4²ë ┤!²ë ╕$5²ë ╝I²ë └]²ë ⌐8q²ë <àⁿΦiǬ∙PÖÇ ¥Ç
  907. ⁿ░╨â@%8@ΓΦá╝╤░≡cÑÅ*$░╕≡ż≡τ╥m¿⌡ε    ╨@#µ≈$âh$âαra╨à`¥è∩Ç%Ç +─▀ TîcOî∩â°1<@  [$¿Ç¼ MMl·0ƒ Y¼─!%6a▐è ¥ì ßá+?±  P<îaTTV ╪iÇ¡≥░ `_ñ»%Çá᪠P█º»ε`éa∙É%H«┴íA%Gár∙É
  908. iw∙Éiφ`╧≥≡╤Çmⁿ▒
  909. ]ÆAáσw7░⌡∩    $·╟Ç√É&^`  ┐ $ⁿ  $■ $╒ nk$J-ÉQ1£PéBù »0αQ/Ñ4╜£░ºP≈Ñ4Ç⌡$(ª▀$@C]Æé≈└╕_SÇçÑ4=iÉ⌠ä╣<_np@Ñ45ò▒Y3ü¼Qí░.i>╠@5+┴╙É╛╙$@ #┴@«╦
  910. $╤
  911. #@Ñú4,p&e÷ü¼_ÇQºÑ4òQ  ü@;¡_áQ@e╠≥@mp!┤a╘O░√`Pñź ÇT°8ÿ!¼Åñ$½╙"q¿ PñCÇ¿α√└╥░eT"ß<p°%Pæ(╧%pδ¥/OêW0Ǽbφ φ B@[â¼8â≥µ≤(    ¿⌡%(Ç∩áTÿp+ óÜ▓0!Σ±(1±░┤ÖÇD└D0Å╡`   $ «îO@╧1
  912. a╝╤j-0ñ│`@╖bΦaT1═⌠╝╤Σ²¼±,1öíî9lÿ28ÇÅ`Γî¿P²$,N0┴O0a╫δ≤0σú`°î╖#0δ≡└X▄1»Σî(▒¥Ç█Ñ"qá√1CÇú╟╨º Å
  913. FT Θ²î└1ÇY0    w ²à░$@AÅ`╦Φ¼╘`▄1A  }┐Ç*5 ΩSδδî`¼îaδæ¼î5 1¿⌡Ω╜⌠ ¼¥╬ü└Qî1S╛≤î9╨iÇ,∙PU(}Ç$üÇ àÇ`σìÇ`QαÜBO$%ÿÇ╧"$Ç«Ç]É.┬\`%WÉ$  W0 ÄâO0]αG┬ur╩░£▒Q¢ú╔Ç≡°s?`X0╘`@ µWâ@╣aá εdq`¥9?Ç&+o0µyÄΣAÅuV(7P╬±@IdQ╕@Å┤@;Ç▓?Çò│CÇ┤╟╨╡KÇÄ30ⁿφ° ó╬ì+]Ä╦≡     Mö╝σ ²y5<!└▀óâ╝É3~mp    $<╛≤9Æ-2ⁿ≡@T,╞Σa,)Pæ└¥#¼╪Q┤S(¼@Aîa≡╤@Ö²±⌠KëD─┴▒▀0╨Ñ$╩-0 ╨ê*╙▓edm`î=3Kß-10è=≥≤²└£mîjy ÿe²ⁿ╨i╕e▓ΣmαÖ╢C%Ç*ê*0 EátQZ`mÄLP%    °üⁿªüNQ∙  T¿<qtWΩc z░ÅÇñΩçǪçÇ«;└<┐á¼¥. á?<Σscî)áí := 0;
  914.       end;
  915.     end;
  916.   end;
  917.   WaitToGo;
  918. end; { UserLineStylePlay }
  919.  
  920.  
  921. procedure SayGoodbye;
  922. { Say goodbye and then exit the program }
  923. var
  924.   ViewInfo : ViewPortType;
  925. begin
  926.   MainWindow('');
  927.   GetViewSettings(ViewInfo);
  928.   SetTextStyle(TriplexFont, HorizDir, 4);
  929.   SetTextJustify(CenterText, CenterText);
  930.   with ViewInfo do
  931.     OutTextXY((x2-x1) div 2, (y2-y1) div 2, 'That''s all folks!');
  932.   StatusLine('Press any key to quit...');
  933.   repeat until KeyPressed;
  934. end; { SayGoodbye }
  935.  
  936.  
  937. PROCEDURE SelectMode;
  938. VAR
  939.     choice1,choice2     : CHAR;
  940.    xsize,ysize            : WORD;
  941. BEGIN
  942.     (* Let's select a mode *)
  943.     ClrScr;
  944.     WriteLn('VESADEMO:');
  945.     WriteLn('1. 256 colors');
  946.     WriteLn('2. 32768 colors');
  947.     WriteLn('3. 65536 colors');
  948.     WriteLn('4. 16777216 colors');
  949.     WriteLn('Q uit');
  950.     WriteLn;
  951.     Write('Your choice: ');
  952.     REPEAT
  953.         ReadLn(choice1);
  954.       IF choice1 <> '1' THEN BEGIN
  955.           WriteLn('Sorry !');
  956.          WriteLn('This demo wasn''t written for more as 256 colors !');
  957.          WriteLn('You would only get a limited impression of the Hi-& TrueColor modes...');
  958.          WriteLn('Switching to 256 colors.');
  959.          choice1 := '1';
  960.       END;
  961.     UNTIL choice1 IN ['1'..'4','q'];
  962.     IF choice1 = 'q' THEN Halt;
  963.  
  964.     WriteLn;
  965.     WriteLn;
  966.     WriteLn('a. 320x200');
  967.     WriteLn('b. 640x480');
  968.     WriteLn('c. 800x600');
  969.     WriteLn('d. 1024x768');
  970.     WriteLn('e. 1280x1024');
  971.     WriteLn('Q uit');
  972.     WriteLn;
  973.     Write('Your choice: ');
  974.     REPEAT
  975.         ReadLn(choice2);
  976.     UNTIL choice2 IN ['a'..'e','q'];
  977.     IF choice2 = 'q' THEN Halt;
  978.  
  979.     CASE choice2 OF
  980.         'a' : BEGIN
  981.             xsize := 320;
  982.             ysize := 200;
  983.         END;
  984.         'b' : BEGIN
  985.             xsize := 640;
  986.             ysize := 480;
  987.         END;
  988.         'c' : BEGIN
  989.             xsize := 800;
  990.             ysize := 600;
  991.         END;
  992.         'd' : BEGIN
  993.             xsize := 1024;
  994.             ysize := 768;
  995.         END;
  996.         'e' : BEGIN
  997.             xsize := 1280;
  998.             ysize := 1024;
  999.         END;
  1000.     END;
  1001.     CASE choice1 OF
  1002.         '1' : mode := FindVesaMode(xsize,ysize,8);
  1003.         '2' : mode := FindVesaMode(xsize,ysize,15);
  1004.         '3' : mode := FindVesaMode(xsize,ysize,16);
  1005.         '4' : mode := FindVesaMode(xsize,ysize,24);
  1006.     END;
  1007.     IF mode = 0 THEN BEGIN
  1008.         WriteLn('No such mode could be found !');
  1009.         WriteLn('Switching to to 320x200.');
  1010.         ReadKey;
  1011.         mode := V320x200x256;
  1012.     END;
  1013. END;
  1014.  
  1015. begin { program body }
  1016.   SelectMode;
  1017.   Initialize;
  1018.   ReportStatus;
  1019.  
  1020. {  AspectRatioPlay; }
  1021.   FillEllipsePlay;
  1022.   SectorPlay;
  1023.   WriteModePlay;
  1024.  
  1025.   ColorPlay;
  1026.   { PalettePlay only intended to work on these drivers: }
  1027.   if (GraphDriver = EGA) or
  1028.       (GraphDriver = EGA64) or
  1029.       (GraphDriver = VGA) then
  1030.      PalettePlay;
  1031.   PutPixelPlay;
  1032. {  PutImagePlay; }
  1033.   RandBarPlay;
  1034.   BarPlay;
  1035.   Bar3DPlay;
  1036.   ArcPlay;
  1037.   CirclePlay;
  1038.   PiePlay;
  1039.   LineToPlay;
  1040.   LineRelPlay;
  1041. {  LineStylePlay; }
  1042. {  UserLineStylePlay; }
  1043.   TextDump;
  1044.   TextPlay;
  1045.   CrtModePlay;
  1046.   FillStylePlay;
  1047.   FillPatternPlay;
  1048.   PolyPlay;
  1049.   SayGoodbye;
  1050. {  CloseGraph; }
  1051.   CloseVesa;
  1052. end.
  1053. ***************************************************
  1054.     '* SHOW D2ROTATE (ABOUT THE ORIGIN)
  1055.     '****************************************************************∞╥≤c≤*φè#^│v/╒:j═φ0t+l▓ô"¬"g└≡?%ªêΣ│H╫½╫╜├¿U'╒⌐⌡ ßV?╩¬ujOΦçEZ1∞▐! ▄B╛Σ8║æ]1GlNÜ┐q▌▓;ô$ΦzE<cª*bEô#ä╧ñÅ"∩─LrdaÖ ╠º╫a^¥£å╬1~)@ëÖMδ╫0═6DäFê¬Çv┼ß╨kæpτ╪É)}ª 1w3╤╧ü⌡¥╓h▓╣≈ïÅaÑ[TⁿHqªÉ╝DKÄ─Y-∞tT╤Θ╨º╟╪.*ÇI9lΦ≈{πτcσ$τπßoFr╪╨∩┼╞╟;O2■e²LÜ4^N|╪½ÅO?╔°FOz`╟╟╟'<>>π$πΘù6·Xgî╖│°oîδπGƒd╝▀░?■╪╔_9L ⌡ôⁿq'æO▀ƒn4╔▀╚▄┼3pτ.òO°·}÷╕ⁿ±'æO?ít│!√8ßÑ≤/┐╣p┼≥┘E╦Vox╕cΦé5╟╚º╙$?√$≥ΘZεsî≡åìΓpKù¢ïß X╥ 9╞≈\µk┤O¥_ 5Üö\≤éÄ┌╤A[╤ÿáï┼éNⁿÅu16    g,%hc╙╨cD╨Vï┘R¢öKñR;8εáΣ╢╪ós╤π╡á└èxgzPÄMú╫yαºÉ+σJ¢i+▓â3╥    ═Ñ╙î^ºG▓█πérφçs %#(╗⌠?┼%u8≡6+QÉ))ò)Afw≈╣╪)B&4░åLXV:δät@Å.;5Φf╢Ät┐ΣJ╫─U8úÇ╟éö£╕p╔┴⌠vg╨╬╥é÷╪╣┬ΓI.ç≡^v╤ZΦÇ& ╒┌6ñô6XßNè╡╬E₧Ñ
  1056. kIº╠▄A+╣╥éb²tæ-Y¡½αÑa═uuîÇ╢αêvhuª╡SÅ┤vèùú¥F;p<d⌐/F─d█éT%▓KΦû=q■öI┐ ┐╠6S$▒÷╚ENΩ¥Fû9╔┌R'╝ ╧φ└?g┬j▓0═/b╖₧─mûé╢┌»ÿÄë/·<éò■░╤╟╢├Xσ:╥P3Θ"╬Læsφ░┌öSö!╗¿*mN£WΣÇ£┤~#╗ææ≥RΩóh:à▌.æ≈╕▌v£äàd▒à╒├=░╖π║$howeg*╬    6ù▄ƒô╕φ░Ö╢qΘD>(w@úKεHÆ╛öúΣU
  1057. éÜR╔╤W▄èê 2M%ó.▓SNÖA1ùJE╢║l]▓¿>\%└Å4ßO▄£â⌐& ê/)8vSP▀▓ôⁿææ√ü√ÑÄa⌠â╚4S╓╟P- ?Σá╕▓Næ*q╡UΘ▓≈^ñ·I.rúR&$Y^╚%è≡B┌≈Ceat
  1058.     Color := RandColor;
  1059.     SetColor(Color);
  1060.     SetFillStyle(Random(CloseDotFill)+1, Color);
  1061.     Bar3D(Random(MaxWidth), Random(MaxHeight),
  1062.           Random(MaxWidth), Random(MaxHeight), 0, TopOff);
  1063.   until KeyPressed;
  1064.   WaitToGo;
  1065. end; { RandBarPlay }
  1066.  
  1067. procedure ArcPlay;
  1068. { Draw random arcs on the screen }
  1069. var
  1070.   MaxRadius : word;
  1071.   EndAngle : word;
  1072.   ArcInfo : ArcCoordsType;
  1073. begin
  1074.   MainWindow('Arc / GetArcCoords demonstration');
  1075.   StatusLine('Esc aborts or press a key');
  1076.   MaxRadius := MaxY div 10;
  1077.   repeat
  1078.     SetColor(RandColor);
  1079.     EndAngle := Random(360);
  1080.     SetLineStyle(SolidLn, 0, NormWidth);
  1081.     Arc(Random(MaxX), Random(MaxY), Random(EndAngle), EndAngle, Random(MaxRadius));
  1082.     GetArcCoords(ArcInfo);
  1083.     with ArcInfo do
  1084.     begin
  1085.       Line(X, Y, XStart, YStart);
  1086.       Line(X, Y, Xend, Yend);
  1087.     end;
  1088.   until KeyPressed;
  1089.   WaitToGo;
  1090. end; { ArcPlay }
  1091.  
  1092. procedure PutPixelPlay;
  1093. { Demonstrate the PutPixel and GetPixel commands }
  1094. const
  1095.   Seed   = 1962; { A seed for the random number generator }
  1096.   NumPts = 2000; { The number of pixels plotted }
  1097.   Esc    = #27;
  1098. var
  1099.   I : word;
  1100.   X, Y, Color : word;
  1101.   XMax, YMax  : integer;
  1102.   ViewInfo    : ViewPortType;
  1103. begin
  1104.   MainWindow('PutPixel / GetPixel demonstration');
  1105.   StatusLine('Esc aborts or press a key...');
  1106.  
  1107.   GetViewSettings(ViewInfo);
  1108.   with ViewInfo do
  1109.   begin
  1110.     XMax := (x2-x1-1);
  1111.     YMax := (y2-y1-1);
  1112.   end;
  1113.  
  1114.   while not KeyPressed do
  1115.   begin
  1116.     { Plot random pixels }
  1117.     RandSeed := Seed;
  1118.     I := 0;
  1119.     while (not KeyPressed) and (I < NumPts) do
  1120.     begin
  1121.       Inc(I);
  1122.         PutPixel(Random(XMax)+1, Random(YMax)+1, RandColor);
  1123.     end;
  1124.  
  1125.     { Erase pixels }
  1126.     RandSeed := Seed;
  1127.     I := 0;
  1128.     while (not KeyPressed) and (I < NumPts) do
  1129.     begin
  1130.       Inc(I);
  1131.       X := Random(XMax)+1;
  1132.       Y := Random(YMax)+1;
  1133.       Color := GetPixel(X, Y);
  1134.         if Color = RandColor then
  1135.           PutPixel(X, Y, 0);
  1136.      end;
  1137.   end;
  1138.   WaitToGo;
  1139. end; { PutPixelPlay }
  1140.  
  1141. procedure PutImagePlay;
  1142. { Demonstrate the GetImage and PutImage commands }
  1143.  
  1144. const
  1145.   r  = 20;
  1146.   StartX = 100;
  1147.   StartY = 50;
  1148.  
  1149. var
  1150.   CurPort : ViewPortType;
  1151.  
  1152. procedure MoveSaucer(var X, Y : integer; Width, Height : integer);
  1153. var
  1154.   Step : integer;
  1155. begin
  1156.   Step := Random(2*r);
  1157.   if Odd(Step) then
  1158.     Step := -Step;
  1159.   X := X + Step;
  1160.   Step := Random(r);
  1161.   if Odd(Step) then
  1162.     Step := -Step;
  1163.   Y := Y + Step;
  1164.  
  1165.   { Make saucer bounce off viewport walls }
  1166.   with CurPort do
  1167.   begin
  1168.     if (x1 + X + Width - 1 > x2) then
  1169.       X := x2-x1 - Width + 1
  1170.     else
  1171.       if (X < 0) then
  1172.         X := 0;
  1173.     if (y1 + Y + Height - 1 > y2) then
  1174.       Y := y2-y1 - Height + 1
  1175.     else
  1176.       if (Y < 0) then
  1177.         Y := 0;
  1178.   end;
  1179. end; { MoveSaucer }
  1180.  
  1181. var
  1182.   Pausetime : word;
  1183.   Saucer    : pointer;
  1184.   X, Y      : integer;
  1185.   ulx, uly  : word;
  1186.   lrx, lry  : word;
  1187.   Size      : word;
  1188.   I         : word;
  1189. begin
  1190.   ClearDevice;
  1191.   FullPort;
  1192.  
  1193.   { PaintScreen }
  1194.   ClearDevice;
  1195.   MainWindow('GetImage / PutImage Demonstration');
  1196.   StatusLine('Esc aborts or press a key...');
  1197.   GetViewSettings(CurPort);
  1198.  
  1199.   { DrawSaucer }
  1200.   Ellipse(StartX, StartY, 0, 360, r, (r div 3)+2);
  1201.   Ellipse(StartX, StartY-4, 190, 357, r, r div 3);
  1202.   Line(StartX+7, StartY-6, StartX+10, StartY-12);
  1203.   Circle(StartX+10, StartY-12, 2);
  1204.   Line(StartX-7, StartY-6, StartX-10, StartY-12);
  1205.   Circle(StartX-10, StartY-12, 2);
  1206.   SetFillStyle(SolidFill, MaxColor);
  1207.   FloodFill(StartX+1, StartY+4, GetColor);
  1208.  
  1209.   { ReadSaucerImage }
  1210.   ulx := StartX-(r+1);
  1211.   uly := StartY-14;
  1212.   lrx := StartX+(r+1);
  1213.   lry := StartY+(r div 3)+3;
  1214.  
  1215.   Size := ImageSize(ulx, uly, lrx, lry);
  1216.   GetMem(Saucer, Size);
  1217.   GetImage(ulx, uly, lrx, lry, Saucer^);
  1218. {  PutImage(ulx, uly, Saucer^, XORput);               { erase image }
  1219.  
  1220.   { Plot some "stars" }
  1221.   for I := 1 to 1000 do
  1222.      PutPixel(Random(MaxX), Random(MaxY), RandColor);
  1223.   X := MaxX div 2;
  1224.   Y := MaxY div 2;
  1225.   PauseTime := 70;
  1226.  
  1227.   { Move the saucer around }
  1228.   repeat
  1229. {     PutImage(X, Y, Saucer^, XORput);                 { draw image }
  1230.      Delay(PauseTime);
  1231. {     PutImage(X, Y, Saucer^, XORput);                 { erase image }
  1232.      MoveSaucer(X, Y, lrx - ulx + 1, lry - uly + 1);  { width/height }
  1233.   until KeyPressed;
  1234.   FreeMem(Saucer, size);
  1235.   WaitToGo;
  1236. end; { PutImagePlay }
  1237.  
  1238. procedure PolyPlay;
  1239. { Draw random polygons with random fill styles on the screen }
  1240. const
  1241.   MaxPts = 5;
  1242. type
  1243.   PolygonType = array[1..MaxPts] of PointType;
  1244. var
  1245.   Poly : PolygonType;
  1246.   I, Color : word;
  1247. begin
  1248.   MainWindow('FillPoly demonstration');
  1249.   StatusLine('Esc aborts or press a key...');
  1250.   repeat
  1251.     Color := RandColor;
  1252.     SetFillStyle(Random(11)+1, Color);
  1253.     SetColor(Color);
  1254.     for I := 1 to MaxPts do
  1255.       with Poly[I] do
  1256.       begin
  1257.         X := Random(MaxX);
  1258.         Y := Random(MaxY);
  1259.       end;
  1260.     FillPoly(MaxPts, Poly);
  1261.   until KeyPressed;
  1262.   WaitToGo;
  1263. end; { PolyPlay }
  1264.  
  1265. procedure FillStylePlay;
  1266. { Display all of the predefined fill styles available }
  1267. var
  1268.   Style    : word;
  1269.   Width    : word;
  1270.   Height   : word;
  1271.   X, Y     : word;
  1272.   I, J     : word;
  1273.   ViewInfo : ViewPortType;
  1274.  
  1275. procedure DrawBox(X, Y : word);
  1276. begin
  1277.   SetFillStyle(Style, MaxColor);
  1278.   with ViewInfo do
  1279.     Bar(X, Y, X+Width, Y+Height);
  1280.   Rectangle(X, Y, X+Width, Y+Height);
  1281.   OutTextXY(X+(Width div 2), Y+Height+4, Int2Str(Style));
  1282.   Inc(Style);
  1283. end; { DrawBox }
  1284.  
  1285. begin
  1286.   MainWindow('Pre-defined fill styles');
  1287.   GetViewSettings(ViewInfo);
  1288.   with ViewInfo do
  1289.   begin
  1290.     Width := 2 * ((x2+1) div 13);
  1291.     Height := 2 * ((y2-10) div 10);
  1292.   end;
  1293.   X := Width div 2;
  1294.   Y := Height div 2;
  1295.   Style := 0;
  1296.   for J := 1 to 3 do
  1297.   begin
  1298.     for I := 1 to 4 do
  1299.     begin
  1300.       DrawBox(X, Y);
  1301.       Inc(X, (Width div 2) * 3);
  1302.     end;
  1303.     X := Width div 2;
  1304.     Inc(Y, (Height div 2) * 3);
  1305.   end;
  1306.   SetTextJustify(LeftText, TopText);
  1307.   WaitToGo;
  1308. end; { FillStylePlay }
  1309.  
  1310. procedure FillPatternPlay;
  1311. { Display some user defined fill patterns }
  1312. const
  1313.   Patterns : array[0..11] of FillPatternType = (
  1314.   ($AA, $55, $AA, $55, $AA, $55, $AA, $55 üÖü üÖü  !BBäx!!!BBäx!BBäx"""DDêp""DDêp>"""BBääêp""!"BDäêêp>IÉÆ|      ° @≥î>00>><Dêx  !BBäx""DDêp&<"DDêê&22TTêêê$> $< @äêp>          ⁿBBBB<  @@Ç****DDDDDDDU¬U¬U¬U¬U¬U¬U¬▌w▌w▌w▌w▌w▌w▌w°°°≥■°°≥≥■≥≥■■°°°    ≤  ≤  ≤≤         °                     ≡≡≡≡≡≡≡≡≡≡≡≡≡≡       ;DDD;    $"Bdÿ>@@@>||>Ac]AAA1N"A""2,  `1NA"*III*<Bü üB<<BüüüB<A" \"QIE" < <BBBB  @@    ~ ?  @ÇB$$B ""A$$"AII6 üBr»$**IIII**ccregion.  The region is defined as any pixel of
  1315.             OldColor which has a path of pixels of OldColor or NewColor
  1316.             with sides touching back to the seed point, (XSeed, YSeed).
  1317.             Therefore, only pixels of OldColor are modified and no other
  1318.             information is changed.
  1319.  
  1320.             SEE ALSO
  1321.  
  1322.             DRWFILLBOX, DRWFILLCIRCLE, DRWFILLELLIPSE, FILLAREA,
  1323.             FILLCONVEXPOLY, FILLPAGE, FILLPOLY, FILLSCREEN, FILLVIEW,
  1324.             SETVIEW
  1325.  
  1326.             EXAMPL(HNxHHO$B<BBBB<$<BBBB<<BBBB<$BBBBBF:0BBBBF:$BBBF:B<""AAA""AAAAA"<B@@B<" <2\A">>xDDxDNDD <` <>BB= > <BBBB< BBBBF:2L\bBBBB&AaQIECA8$>""">0@@A>@@@ b$(. b$(*
  1327.     $    $    $DDDDDDD¬U¬U¬U¬U¬U¬U¬Uw▌w▌w▌w▌w▌w▌w▌°°°⌠ⁿ°°⌠⌠ⁿ⌠⌠ⁿⁿ°°°    ≈  ≈  ≈≈         °                     ≡≡≡≡≡≡≡≡≡≡≡≡≡≡       7HH7"B\DBBRL~BB@@@@@@?R~!!~?DDDD8BBBB|@@Ç>P>III>"AA""AAA"Uw<DDDD86II6"EIQ"\ @@ "AAAAA> >     hH02L2L$$<H(,$<>>>>>>>         VMODE=VIDEOMODEGET
  1328.             IF WHICHVGA = 0 THEN STOP
  1329.             DUMMY=RES640
  1330.             SETVIEW 100, 100, 539, 379
  1331.             FILLVIEW 10
  1332.             WHILE INKEY$ = ""
  1333.             WEND
  1334.             VIDEOMODESET VMODE
  1335.             END
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.                                                                          63
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.           FONTGETINFO
  1359.  
  1360.             PROTOTYPE
  1361.  
  1362.             SUB FONTGETINFO (Width%, Height%)
  1363.  
  1364.             INPUT
  1365.  
  1366.             no input parameters
  1367.     WEND
  1368.             MOUSEEXIT
  1369.             VIDEOMODESET VMODE
  1370.             END
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.                                                                          86
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.           MOUSECURSORDEFAULT
  1418.  
  1419.             PROTOTYPE
  1420.  
  1421.             SUB MOUSECURSORDEFAULT ()
  1422.  
  1423.             INPUT
  1424.  
  1425.             no input parameters
  1426.  
  1427.             OUTPUT
  1428.  
  1429.             no value returned
  1430.  
  1431.             USAGE
  1432.  
  1433.             MOUSECURSORDEFAULT defines the mouse cursor to be a small
  1434.        ,K$╖┼╘╤░XQ)σ┤ö≡÷┴─┤àñT┘,╘¬àñX9╘⌠àñ\9╘UÜ╢≤`9╘4a╘d9╘UTa╘h9╘ta╘l9╘Uöa╘p9╘┤a╘t┘PT±x┴îÇ╖0▓ïα│ÅαU┤ôα╡ùα╢¢α╖úΓ╘pǺΓ╕¡αë ╚┴πì°sKÉφb<$⌡▌ë     φë φë I1φë  Eφë $YφÆë (mφë ,üφë 0$òφë á⌐φë ñ╜φë I¿╤φë ¼σφë ░∙φÆë 4²ë ┤!²ë ╕$5²ë ╝I²ë └]²ë ⌐8q²ë <àⁿΦiǬ∙PÖÇ ¥Ç
  1435. ⁿ░╨â@%8@ΓΦá╝╤░≡cÑÅ*$░╕≡ż≡τ╥m¿⌡ε    ╨@#µ≈$âh$âαra╨à`¥è∩Ç%Ç +─▀ TîcOî∩â°1<@  [$¿Ç¼ MMl·0ƒ Y¼─!%6a▐è ¥ì ßá+?±  P<îaTTV ╪iÇ¡≥░ `_ñ»%Çá᪠P█º»ε`éa∙É%H«┴íA%Gár∙É
  1436. iw∙Éiφ`╧≥≡╤Çmⁿ▒
  1437. ]ÆAáσw7░⌡∩    $·╟Ç√É&^`  ┐ $ⁿ  $■ $╒ nk$J-ÉQ1£PéBù »0αQ/Ñ4╜£░ºP≈Ñ4Ç⌡$(ª▀$@C]Æé≈└╕_SÇçÑ4=iÉ⌠ä╣<_np@Ñ45ò▒Y3ü¼Qí░.i>╠@5+┴╙É╛╙$@ #┴@«╦
  1438. $╤
  1439. #@Ñú4,p&e÷ü¼_ÇQºÑ4òQ  ü@;¡_áQ@e╠≥@mp!┤a╘O░√`Pñź ÇT°8ÿ!¼Åñ$½╙"q¿ PñCÇ¿α√└╥░eT"ß<p°%Pæ(╧%pδ¥/OêW0Ǽbφ φ B@[â¼8â≥µ≤(    ¿⌡%(Ç∩áTÿp+ óÜ▓0!Σ±(1±░┤ÖÇD└D0Å╡`   $ «îO@╧1
  1440. a╝╤j-0ñ│`@╖bΦaT1═⌠╝╤Σ²¼±,1öíî9lÿ28ÇÅ`Γî¿P²$,N0┴O0a╫δ≤0σú`°î╖#0δ≡└X▄1»Σî(▒¥Ç█Ñ"qá√1CÇú╟╨º Å
  1441. FT Θ²î└1ÇY0    w ²à░$@AÅ`╦Φ¼╘`▄1A  }┐Ç*5 ΩSδδî`¼îaδæ¼î5 1¿⌡Ω╜⌠ ¼¥╬ü└Qî1S╛≤î9╨iÇ,∙PU(}Ç$üÇ àÇ`σìÇ`QαÜBO$%ÿÇ╧"$Ç«Ç]É.┬\`%WÉ$  W0 ÄâO0]αG┬ur╩░£▒Q¢ú╔Ç≡°s?`X0╘`@ µWâ@╣aá εdq`¥9?Ç&+o0µyÄΣAÅuV(7P╬±@IdQ╕@Å┤@;Ç▓?Çò│CÇ┤╟╨╡KÇÄ30ⁿφ° ó╬ì+]Ä╦≡     Mö╝σ ²y5<!└▀óâ╝É3~mp    $<╛≤9Æ-2ⁿ≡@T,╞Σa,)Pæ└¥#¼╪Q┤S(¼@Aîa≡╤@Ö²±⌠KëD─┴▒▀0╨Ñ$╩-0 ╨ê*╙▓edm`î=3Kß-10è=≥≤²└£mîjy ÿe²ⁿ╨i╕e▓ΣmαÖ╢C%Ç*ê*0 EátQZ`mÄLP%    °üⁿªüNQ∙  T¿<qtWΩc z░ÅÇñΩçǪçÇ«;└<┐á¼¥. á?<Σscî)áí := 0;
  1442.       end;
  1443.     end;
  1444.   end;
  1445.   WaitToGo;
  1446. end; { UserLineStylePlay }
  1447.  
  1448.  
  1449. procedure SayGoodbye;
  1450. { Say goodbye and then exit the program }
  1451. var
  1452.   ViewInfo : ViewPortType;
  1453. begin
  1454.   MainWindow('');
  1455.   GetViewSettings(ViewInfo);
  1456.   SetTextStyle(TriplexFont, HorizDir, 4);
  1457.   SetTextJustify(CenterText, CenterText);
  1458.   with ViewInfo do
  1459.     OutTextXY((x2-x1) div 2, (y2-y1) div 2, 'That''s all folks!');
  1460.   StatusLine('Press any key to quit...');
  1461.   repeat until KeyPressed;
  1462. end; { SayGoodbye }
  1463.  
  1464.  
  1465. PROCEDURE SelectMode;
  1466. VAR
  1467.     choice1,choice2     : CHAR;
  1468.    xsize,ysize            : WORD;
  1469. BEGIN
  1470.     (* Let's select a mode *)
  1471.     ClrScr;
  1472.     WriteLn('VESADEMO:');
  1473.     WriteLn('1. 256 colors');
  1474.     WriteLn('2. 32768 colors');
  1475.     WriteLn('3. 65536 colors');
  1476.     WriteLn('4. 16777216 colors');
  1477.     WriteLn('Q uit');
  1478.     WriteLn;
  1479.     Write('Your choice: ');
  1480.     REPEAT
  1481.         ReadLn(choice1);
  1482.       IF choice1 <> '1' THEN BEGIN
  1483.           WriteLn('Sorry !');
  1484.          WriteLn('This demo wasn''t written for more as 256 colors !');
  1485.          WriteLn('You would only get a limited impression of the Hi-& TrueColor modes...');
  1486.          WriteLn('Switching to 256 colors.');
  1487.          choice1 := '1';
  1488.       END;
  1489.     UNTIL choice1 IN ['1'..'4','q'];
  1490.     IF choice1 = 'q' THEN Halt;
  1491.  
  1492.     WriteLn;
  1493.     WriteLn;
  1494.     WriteLn('a. 320x200');
  1495.     WriteLn('b. 640x480');
  1496.     WriteLn('c. 800x600');
  1497.     WriteLn('d. 1024x768');
  1498.     WriteLn('e. 1280x1024');
  1499.     WriteLn('Q uit');
  1500.     WriteLn;
  1501.     Write('Your choice: ');
  1502.     REPEAT
  1503.         ReadLn(choice2);
  1504.     UNTIL choice2 IN ['a'..'e','q'];
  1505.     IF choice2 = 'q' THEN Halt;
  1506.  
  1507.     CASE choice2 OF
  1508.         'a' : BEGIN
  1509.             xsize := 320;
  1510.             ysize := 200;
  1511.         END;
  1512.         'b' : BEGIN
  1513.             xsize := 640;
  1514.             ysize := 480;
  1515.         END;
  1516.         'c' : BEGIN
  1517.             xsize := 800;
  1518.             ysize := 600;
  1519.         END;
  1520.         'd' : BEGIN
  1521.             xsize := 1024;
  1522.             ysize := 768;
  1523.         END;
  1524.         'e' : BEGIN
  1525.             xsize := 1280;
  1526.             ysize := 1024;
  1527.         END;
  1528.     END;
  1529.     CASE choice1 OF
  1530.         '1' : mode := FindVesaMode(xsize,ysize,8);
  1531.         '2' : mode := FindVesaMode(xsize,ysize,15);
  1532.         '3' : mode := FindVesaMode(xsize,ysize,16);
  1533.         '4' : mode := FindVesaMode(xsize,ysize,24);
  1534.     END;
  1535.     IF mode = 0 THEN BEGIN
  1536.         WriteLn('No such mode could be found !');
  1537.         WriteLn('Switching to to 320x200.');
  1538.         ReadKey;
  1539.         mode := V320x200x256;
  1540.     END;
  1541. END;
  1542.  
  1543. begin { program body }
  1544.   SelectMode;
  1545.   Initialize;
  1546.   ReportStatus;
  1547.  
  1548. {  AspectRatioPlay; }
  1549.   FillEllipsePlay;
  1550.   SectorPlay;
  1551.   WriteModePlay;
  1552.  
  1553.   ColorPlay;
  1554.   { PalettePlay only intended to work on these drivers: }
  1555.   if (GraphDriver = EGA) or
  1556.       (GraphDriver = EGA64) or
  1557.       (GraphDriver = VGA) then
  1558.      PalettePlay;
  1559.   PutPixelPlay;
  1560. {  PutImagePlay; }
  1561.   RandBarPlay;
  1562.   BarPlay;
  1563.   Bar3DPlay;
  1564.   ArcPlay;
  1565.   CirclePlay;
  1566.   PiePlay;
  1567.   LineToPlay;
  1568.   LineRelPlay;
  1569. {  LineStylePlay; }
  1570. {  UserLineStylePlay; }
  1571.   TextDump;
  1572.   TextPlay;
  1573.   CrtModePlay;
  1574.   FillStylePlay;
  1575.   FillPatternPlay;
  1576.   PolyPlay;
  1577.   SayGoodbye;
  1578. {  CloseGraph; }
  1579.   CloseVesa;
  1580. end.
  1581. ***************************************************
  1582.     '* SHOW D2ROTATE (ABOUT THE ORIGIN)
  1583.     '****************************************************************∞╥≤c≤*φè#^│v/╒:j═φ0t+l▓ô"¬"g└≡?%ªêΣ│H╫½╫╜├¿U'╒⌐⌡ ßV?╩¬ujOΦçEZ1∞▐! ▄B╛Σ8║æ]1GlNÜ┐q▌▓;ô$ΦzE<cª*bEô#ä╧ñÅ"∩─LrdaÖ ╠º╫a^¥£å╬1~)@ëÖMδ╫0═6DäFê¬Çv┼ß╨kæpτ╪É)}ª 1w3╤╧ü⌡¥╓h▓╣≈ïÅaÑ[TⁿHqªÉ╝DKÄ─Y-∞tT╤Θ╨º╟╪.*ÇI9lΦ≈{πτcσ$τπßoFr╪╨∩┼╞╟;O2■e²LÜ4^N|╪½ÅO?╔°FOz`╟╟╟'<>>π$πΘù6·Xgî╖│°oîδπGƒd╝▀░?■╪╔_9L ⌡ôⁿq'æO▀ƒn4╔▀╚▄┼3pτ.òO°·}÷╕ⁿ±'æO?ít│!√8ßÑ≤/┐╣p┼≥┘E╦Vox╕cΦé5╟╚º╙$?√$≥ΘZεsî≡åìΓpKù¢ïß X╥ 9╞≈\µk┤O¥_ 5Üö\≤éÄ┌╤A[╤ÿáï┼éNⁿÅu16    g,%hc╙╨cD╨Vï┘R¢öKñR;8εáΣ╢╪ós╤π╡á└èxgzPÄMú╫yαºÉ+σJ¢i+▓â3╥    ═Ñ╙î^ºG▓█πérφçs %#(╗⌠?┼%u8≡6+QÉ))ò)Afw≈╣╪)B&4░åLXV:δät@Å.;5Φf╢Ät┐ΣJ╫─U8úÇ╟éö£╕p╔┴⌠vg╨╬╥é÷╪╣┬ΓI.ç≡^v╤ZΦÇ& ╒┌6ñô6XßNè╡╬E₧Ñ
  1584. kIº╠▄A+╣╥éb²tæ-Y¡½αÑa═uuîÇ╢αêvhuª╡SÅ┤vèùú¥F;p<d⌐/F─d█éT%▓KΦû=q■öI┐ ┐╠6S$▒÷╚ENΩ¥Fû9╔┌R'╝ ╧φ└?g┬j▓0═/b╖₧─mûé╢┌»ÿÄë/·<éò■░╤╟╢├Xσ:╥P3Θ"╬Læsφ░┌öSö!╗¿*mN£WΣÇ£┤~#╗ææ≥RΩóh:à▌.æ≈╕▌v£äàd▒à╒├=░╖π║$howeg*╬    6ù▄ƒô╕φ░Ö╢qΘD>(w@úKεHÆ╛öúΣU
  1585. éÜR╔╤W▄èê 2M%ó.▓SNÖA1ùJE╢║l]▓¿>\%└Å4ßO▄£â⌐& ê/)8vSP▀▓ôⁿææ√ü√ÑÄa⌠â╚4S╓╟P- ?Σá╕▓Næ*q╡UΘ▓≈^ñ·I.rúR&$Y^╚%è≡B┌≈Ceat
  1586.     Color := RandColor;
  1587.     SetColor(Color);
  1588.     SetFillStyle(Random(CloseDotFill)+1, Color);
  1589.     Bar3D(Random(MaxWidth), Random(MaxHeight),
  1590.           Random(MaxWidth), Random(MaxHeight), 0, TopOff);
  1591.   until KeyPressed;
  1592.   WaitToGo;
  1593. end; { RandBarPlay }
  1594.  
  1595. procedure ArcPlay;
  1596. { Draw random arcs on the screen }
  1597. var
  1598.   MaxRadius : word;
  1599.   EndAngle : word;
  1600.   ArcInfo : ArcCoordsType;
  1601. begin
  1602.   MainWindow('Arc / GetArcCoords demonstration');
  1603.   StatusLine('Esc aborts or press a key');
  1604.   MaxRadius := MaxY div 10;
  1605.   repeat
  1606.     SetColor(RandColor);
  1607.     EndAngle := Random(360);
  1608.     SetLineStyle(SolidLn, 0, NormWidth);
  1609.     Arc(Random(MaxX), Random(MaxY), Random(EndAngle), EndAngle, Random(MaxRadius));
  1610.     GetArcCoords(ArcInfo);
  1611.     with ArcInfo do
  1612.     begin
  1613.       Line(X, Y, XStart, YStart);
  1614.       Line(X, Y, Xend, Yend);
  1615.     end;
  1616.   until KeyPressed;
  1617.   WaitToGo;
  1618. end; { ArcPlay }
  1619.  
  1620. procedure PutPixelPlay;
  1621. { Demonstrate the PutPixel and GetPixel commands }
  1622. const
  1623.   Seed   = 1962; { A seed for the random number generator }
  1624.   NumPts = 2000; { The number of pixels plotted }
  1625.   Esc    = #27;
  1626. var
  1627.   I : word;
  1628.   X, Y, Color : word;
  1629.   XMax, YMax  : integer;
  1630.   ViewInfo    : ViewPortType;
  1631. begin
  1632.   MainWindow('PutPixel / GetPixel demonstration');
  1633.   StatusLine('Esc aborts or press a key...');
  1634.  
  1635.   GetViewSettings(ViewInfo);
  1636.   with ViewInfo do
  1637.   begin
  1638.     XMax := (x2-x1-1);
  1639.     YMax := (y2-y1-1);
  1640.   end;
  1641.  
  1642.   while not KeyPressed do
  1643.   begin
  1644.     { Plot random pixels }
  1645.     RandSeed := Seed;
  1646.     I := 0;
  1647.     while (not KeyPressed) and (I < NumPts) do
  1648.     begin
  1649.       Inc(I);
  1650.         PutPixel(Random(XMax)+1, Random(YMax)+1, RandColor);
  1651.     end;
  1652.  
  1653.     { Erase pixels }
  1654.     RandSeed := Seed;
  1655.     I := 0;
  1656.     while (not KeyPressed) and (I < NumPts) do
  1657.     begin
  1658.       Inc(I);
  1659.       X := Random(XMax)+1;
  1660.       Y := Random(YMax)+1;
  1661.       Color := GetPixel(X, Y);
  1662.         if Color = RandColor then
  1663.           PutPixel(X, Y, 0);
  1664.      end;
  1665.   end;
  1666.   WaitToGo;
  1667. end; { PutPixelPlay }
  1668.  
  1669. procedure PutImagePlay;
  1670. { Demonstrate the GetImage and PutImage commands }
  1671.  
  1672. const
  1673.   r  = 20;
  1674.   StartX = 100;
  1675.   StartY = 50;
  1676.  
  1677. var
  1678.   CurPort : ViewPortType;
  1679.  
  1680. procedure MoveSaucer(var X, Y : integer; Width, Height : integer);
  1681. var
  1682.   Step : integer;
  1683. begin
  1684.   Step := Random(2*r);
  1685.   if Odd(Step) then
  1686.     Step := -Step;
  1687.   X := X + Step;
  1688.   Step := Random(r);
  1689.   if Odd(Step) then
  1690.     Step := -Step;
  1691.   Y := Y + Step;
  1692.  
  1693.   { Make saucer bounce off viewport walls }
  1694.   with CurPort do
  1695.   begin
  1696.     if (x1 + X + Width - 1 > x2) then
  1697.       X := x2-x1 - Width + 1
  1698.     else
  1699.       if (X < 0) then
  1700.         X := 0;
  1701.     if (y1 + Y + Height - 1 > y2) then
  1702.       Y := y2-y1 - Height + 1
  1703.     else
  1704.       if (Y < 0) then
  1705.         Y := 0;
  1706.   end;
  1707. end; { MoveSaucer }
  1708.  
  1709. var
  1710.   Pausetime : word;
  1711.   Saucer    : pointer;
  1712.   X, Y      : integer;
  1713.   ulx, uly  : word;
  1714.   lrx, lry  : word;
  1715.   Size      : word;
  1716.   I         : word;
  1717. begin
  1718.   ClearDevice;
  1719.   FullPort;
  1720.  
  1721.   { PaintScreen }
  1722.   ClearDevice;
  1723.   MainWindow('GetImage / PutImage Demonstration');
  1724.   StatusLine('Esc aborts or press a key...');
  1725.   GetViewSettings(CurPort);
  1726.  
  1727.   { DrawSaucer }
  1728.   Ellipse(StartX, StartY, 0, 360, r, (r div 3)+2);
  1729.   Ellipse(StartX, StartY-4, 190, 357, r, r div 3);
  1730.   Line(StartX+7, StartY-6, StartX+10, StartY-12);
  1731.   Circle(StartX+10, StartY-12, 2);
  1732.   Line(StartX-7, StartY-6, StartX-10, StartY-12);
  1733.   Circle(StartX-10, StartY-12, 2);
  1734.   SetFillStyle(SolidFill, MaxColor);
  1735.   FloodFill(StartX+1, StartY+4, GetColor);
  1736.  
  1737.   { ReadSaucerImage }
  1738.   ulx := StartX-(r+1);
  1739.   uly := StartY-14;
  1740.   lrx := StartX+(r+1);
  1741.   lry := StartY+(r div 3)+3;
  1742.  
  1743.   Size := ImageSize(ulx, uly, lrx, lry);
  1744.   GetMem(Saucer, Size);
  1745.   GetImage(ulx, uly, lrx, lry, Saucer^);
  1746. {  PutImage(ulx, uly, Saucer^, XORput);               { erase image }
  1747.  
  1748.   { Plot some "stars" }
  1749.   for I := 1 to 1000 do
  1750.      PutPixel(Random(MaxX), Random(MaxY), RandColor);
  1751.   X := MaxX div 2;
  1752.   Y := MaxY div 2;
  1753.   PauseTime := 70;
  1754.  
  1755.   { Move the saucer around }
  1756.   repeat
  1757. {     PutImage(X, Y, Saucer^, XORput);                 { draw image }
  1758.      Delay(PauseTime);
  1759. {     PutImage(X, Y, Saucer^, XORput);                 { erase image }
  1760.      MoveSaucer(X, Y, lrx - ulx + 1, lry - uly + 1);  { width/height }
  1761.   until KeyPressed;
  1762.   FreeMem(Saucer, size);
  1763.   WaitToGo;
  1764. end; { PutImagePlay }
  1765.  
  1766. procedure PolyPlay;
  1767. { Draw random polygons with random fill styles on the screen }
  1768. const
  1769.   MaxPts = 5;
  1770. type
  1771.   PolygonType = array[1..MaxPts] of PointType;
  1772. var
  1773.   Poly : PolygonType;
  1774.   I, Color : word;
  1775. begin
  1776.   MainWindow('FillPoly demonstration');
  1777.   StatusLine('Esc aborts or press a key...');
  1778.   repeat
  1779.     Color := RandColor;
  1780.     SetFillStyle(Random(11)+1, Color);
  1781.     SetColor(Color);
  1782.     for I := 1 to MaxPts do
  1783.       with Poly[I] do
  1784.       begin
  1785.         X := Random(MaxX);
  1786.         Y := Random(MaxY);
  1787.       end;
  1788.     FillPoly(MaxPts, Poly);
  1789.   until KeyPressed;
  1790.   WaitToGo;
  1791. end; { PolyPlay }
  1792.  
  1793. procedure FillStylePlay;
  1794. { Display all of the predefined fill styles available }
  1795. var
  1796.   Style    : word;
  1797.   Width    : word;
  1798.   Height   : word;
  1799.   X, Y     : word;
  1800.   I, J     : word;
  1801.   ViewInfo : ViewPortType;
  1802.  
  1803. procedure DrawBox(X, Y : word);
  1804. begin
  1805.   SetFillStyle(Style, MaxColor);
  1806.   with ViewInfo do
  1807.     Bar(X, Y, X+Width, Y+Height);
  1808.   Rectangle(X, Y, X+Width, Y+Height);
  1809.   OutTextXY(X+(Width div 2), Y+Height+4, Int2Str(Style));
  1810.   Inc(Style);
  1811. end; { DrawBox }
  1812.  
  1813. begin
  1814.   MainWindow('Pre-defined fill styles');
  1815.   GetViewSettings(ViewInfo);
  1816.   with ViewInfo do
  1817.   begin
  1818.     Width := 2 * ((x2+1) div 13);
  1819.     Height := 2 * ((y2-10) div 10);
  1820.   end;
  1821.   X := Width div 2;
  1822.   Y := Height div 2;
  1823.   Style := 0;
  1824.   for J := 1 to 3 do
  1825.   begin
  1826.     for I := 1 to 4 do
  1827.     begin
  1828.       DrawBox(X, Y);
  1829.       Inc(X, (Width div 2) * 3);
  1830.     end;
  1831.     X := Width div 2;
  1832.     Inc(Y, (Height div 2) * 3);
  1833.   end;
  1834.   SetTextJustify(LeftText, TopText);
  1835.   WaitToGo;
  1836. end; { FillStylePlay }
  1837.  
  1838. procedure FillPatternPlay;
  1839. { Display some user defined fill patterns }
  1840. const
  1841.   Patterns : array[0..11] of FillPatternType = (
  1842.   ($AA, $55, $AA, $55, $AA, $55, $AA, $55 üÖü üÖü  !BBäx!!!BBäx!BBäx"""DDêp""DDêp>"""BBääêp""!"BDäêêp>IÉÆ|      ° @≥î>00>><Dêx  !BBäx""DDêp&<"DDêê&22TTêêê$> $< @äêp>          ⁿBBBB<  @@Ç****DDDDDDDU¬U¬U¬U¬U¬U¬U¬▌w▌w▌w▌w▌w▌w▌w°°°≥■°°≥≥■≥≥■■°°°    ≤  ≤  ≤≤         °                     ≡≡≡≡≡≡≡≡≡≡≡≡≡≡       ;DDD;    $"Bdÿ>@@@>||>Ac]AAA1N"A""2,  `1NA"*III*<Bü üB<<BüüüB<A" \"QIE" < <BBBB  @@    ~ ?  @ÇB$$B ""A$$"AII6 üBr»$**IIII**ccregion.  The region is defined as any pixel of
  1843.             OldColor which has a path of pixels of OldColor or NewColor
  1844.             with sides touching back to the seed point, (XSeed, YSeed).
  1845.             Therefore, only pixels of OldColor are modified and no other
  1846.             information is changed.
  1847.  
  1848.             SEE ALSO
  1849.  
  1850.             DRWFILLBOX, DRWFILLCIRCLE, DRWFILLELLIPSE, FILLAREA,
  1851.             FILLCONVEXPOLY, FILLPAGE, FILLPOLY, FILLSCREEN, FILLVIEW,
  1852.             SETVIEW
  1853.  
  1854.             EXAMPL(HNxHHO$B<BBBB<$<BBBB<<BBBB<$BBBBBF:0BBBBF:$BBBF:B<""AAA""AAAAA"<B@@B<" <2\A">>xDDxDNDD <` <>BB= > <BBBB< BBBBF:2L\bBBBB&AaQIECA8$>""">0@@A>@@@ b$(. b$(*
  1855.     $    $    $DDDDDDD¬U¬U¬U¬U¬U¬U¬Uw▌w▌w▌w▌w▌w▌w▌°°°⌠ⁿ°°⌠⌠ⁿ⌠⌠ⁿⁿ°°°    ≈  ≈  ≈≈         °                     ≡≡≡≡≡≡≡≡≡≡≡≡≡≡       7HH7"B\DBBRL~BB@@@@@@?R~!!~?DDDD8BBBB|@@Ç>P>III>"AA""AAA"Uw<DDDD86II6"EIQ"\ @@ "AAAAA> >     hH02L2L$$<H(,$<>>>>>>>         VMODE=VIDEOMODEGET
  1856.             IF WHICHVGA = 0 THEN STOP
  1857.             DUMMY=RES640
  1858.             SETVIEW 100, 100, 539, 379
  1859.             FILLVIEW 10
  1860.             WHILE INKEY$ = ""
  1861.             WEND
  1862.             VIDEOMODESET VMODE
  1863.             END
  1864.  
  1865.  
  1866.  
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.                                                                          63
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.           FONTGETINFO
  1887.  
  1888.             PROTOTYPE
  1889.  
  1890.             SUB FONTGETINFO (Width%, Height%)
  1891.  
  1892.             INPUT
  1893.  
  1894.             no input parameters
  1895.     WEND
  1896.             MOUSEEXIT
  1897.             VIDEOMODESET VMODE
  1898.             END
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.  
  1922.  
  1923.  
  1924.  
  1925.  
  1926.  
  1927.  
  1928.  
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.                                                                          86
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.           MOUSECURSORDEFAULT
  1946.  
  1947.             PROTOTYPE
  1948.  
  1949.             SUB MOUSECURSORDEFAULT ()
  1950.  
  1951.             INPUT
  1952.  
  1953.             no input parameters
  1954.  
  1955.             OUTPUT
  1956.  
  1957.             no value returned
  1958.  
  1959.             USAGE
  1960.  
  1961.             MOUSECURSORDEFAULT defines the mouse cursor to be a small
  1962.        ,K$╖┼╘╤░XQ)σ┤ö≡÷┴─┤àñT┘,╘¬àñX9╘⌠àñ\9╘UÜ╢≤`9╘4a╘d9╘UTa╘h9╘ta╘l9╘Uöa╘p9╘┤a╘t┘PT±x┴îÇ╖0▓ïα│ÅαU┤ôα╡ùα╢¢α╖úΓ╘pǺΓ╕¡αë ╚┴πì°sKÉφb<$⌡▌ë     φë φë I1φë  Eφë $YφÆë (mφë ,üφë 0$òφë á⌐φë ñ╜φë I¿╤φë ¼σφë ░∙φÆë 4²ë ┤!²ë ╕$5²ë ╝I²ë └]²ë ⌐8q²ë <àⁿΦiǬ∙PÖÇ ¥Ç
  1963. ⁿ░╨â@%8@ΓΦá╝╤░≡cÑÅ*$░╕≡ż≡τ╥m¿⌡ε    ╨@#µ≈$âh$âαra╨à`¥è∩Ç%Ç +─▀ TîcOî∩â°1<@  [$¿Ç¼ MMl·0ƒ Y¼─!%6a▐è ¥ì ßá+?±  P<îaTTV ╪iÇ¡≥░ `_ñ»%Çá᪠P█º»ε`éa∙É%H«┴íA%Gár∙É
  1964. iw∙Éiφ`╧≥≡╤Çmⁿ▒
  1965. ]ÆAáσw7░⌡∩    $·╟Ç√É&^`  ┐ $ⁿ  $■ $╒ nk$J-ÉQ1£PéBù »0αQ/Ñ4╜£░ºP≈Ñ4Ç⌡$(ª▀$@C]Æé≈└╕_SÇçÑ4=iÉ⌠ä╣<_np@Ñ45ò▒Y3ü¼Qí░.i>╠@5+┴╙É╛╙$@ #┴@«╦
  1966. $╤
  1967. #@Ñú4,p&e÷ü¼_ÇQºÑ4òQ  ü@;¡_áQ@e╠≥@mp!┤a╘O░√`Pñź ÇT°8ÿ!¼Åñ$½╙"q¿ PñCÇ¿α√└╥░eT"ß<p°%Pæ(╧%pδ¥/OêW0Ǽbφ φ B@[â¼8â≥µ≤(    ¿⌡%(Ç∩áTÿp+ óÜ▓0!Σ±(1±░┤ÖÇD└D0Å╡`   $ «îO@╧1
  1968. a╝╤j-0ñ│`@╖bΦaT1═⌠╝╤Σ²¼±,1öíî9lÿ28ÇÅ`Γî¿P²$,N0┴O0a╫δ≤0σú`°î╖#0δ≡└X▄1»Σî(▒¥Ç█Ñ"qá√1CÇú╟╨º Å
  1969. FT Θ²î└1ÇY0    w ²à░$@AÅ`╦Φ¼╘`▄1A  }┐Ç*5 ΩSδδî`¼îaδæ¼î5 1¿⌡Ω╜⌠ ¼¥╬ü└Qî1S╛≤î9╨iÇ,∙PU(}Ç$üÇ àÇ`σìÇ`QαÜBO$%ÿÇ╧"$Ç«Ç]É.┬\`%WÉ$  W0 ÄâO0]αG┬ur╩░£▒Q¢ú╔Ç≡°s?`X0╘`@ µWâ@╣aá εdq`¥9?Ç&+o0µyÄΣAÅuV(7P╬±@IdQ╕@Å┤@;Ç▓?Çò│CÇ┤╟╨╡KÇÄ30ⁿφ° ó╬ì+]Ä╦≡     Mö╝σ ²y5<!└▀óâ╝É3~mp    $<╛≤9Æ-2ⁿ≡@T,╞Σa,)Pæ└¥#¼╪Q┤S(¼@Aîa≡╤@Ö²±⌠KëD─┴▒▀0╨Ñ$╩-0 ╨ê*╙▓edm`î=3Kß-10è=≥≤²└£mîjy ÿe²ⁿ╨i╕e▓ΣmαÖ╢C%Ç*ê*0 EátQZ`mÄLP%    °üⁿªüNQ∙  T¿<qtWΩc z░ÅÇñΩçǪçÇ«;└<┐á¼¥. á?<Σscî)áí := 0;
  1970.       end;
  1971.     end;
  1972.   end;
  1973.   WaitToGo;
  1974. end; { UserLineStylePlay }
  1975.  
  1976.  
  1977. procedure SayGoodbye;
  1978. { Say goodbye and then exit the program }
  1979. var
  1980.   ViewInfo : ViewPortType;
  1981. begin
  1982.   MainWindow('');
  1983.   GetViewSettings(ViewInfo);
  1984.   SetTextStyle(TriplexFont, HorizDir, 4);
  1985.   SetTextJustify(CenterText, CenterText);
  1986.   with ViewInfo do
  1987.     OutTextXY((x2-x1) div 2, (y2-y1) div 2, 'That''s all folks!');
  1988.   StatusLine('Press any key to quit...');
  1989.   repeat until KeyPressed;
  1990. end; { SayGoodbye }
  1991.  
  1992.  
  1993. PROCEDURE SelectMode;
  1994. VAR
  1995.     choice1,choice2     : CHAR;
  1996.    xsize,ysize            : WORD;
  1997. BEGIN
  1998.     (* Let's select a mode *)
  1999.     ClrScr;
  2000.     WriteLn('VESADEMO:');
  2001.     WriteLn('1. 256 colors');
  2002.     WriteLn('2. 32768 colors');
  2003.     WriteLn('3. 65536 colors');
  2004.     WriteLn('4. 16777216 colors');
  2005.     WriteLn('Q uit');
  2006.     WriteLn;
  2007.     Write('Your choice: ');
  2008.     REPEAT
  2009.         ReadLn(choice1);
  2010.       IF choice1 <> '1' THEN BEGIN
  2011.           WriteLn('Sorry !');
  2012.          WriteLn('This demo wasn''t written for more as 256 colors !');
  2013.          WriteLn('You would only get a limited impression of the Hi-& TrueColor modes...');
  2014.          WriteLn('Switching to 256 colors.');
  2015.          choice1 := '1';
  2016.       END;
  2017.     UNTIL choice1 IN ['1'..'4','q'];
  2018.     IF choice1 = 'q' THEN Halt;
  2019.  
  2020.     WriteLn;
  2021.     WriteLn;
  2022.     WriteLn('a. 320x200');
  2023.     WriteLn('b. 640x480');
  2024.     WriteLn('c. 800x600');
  2025.     WriteLn('d. 1024x768');
  2026.     WriteLn('e. 1280x1024');
  2027.     WriteLn('Q uit');
  2028.     WriteLn;
  2029.     Write('Your choice: ');
  2030.     REPEAT
  2031.         ReadLn(choice2);
  2032.     UNTIL choice2 IN ['a'..'e','q'];
  2033.     IF choice2 = 'q' THEN Halt;
  2034.  
  2035.     CASE choice2 OF
  2036.         'a' : BEGIN
  2037.             xsize := 320;
  2038.             ysize := 200;
  2039.         END;
  2040.         'b' : BEGIN
  2041.             xsize := 640;
  2042.             ysize := 480;
  2043.         END;
  2044.         'c' : BEGIN
  2045.             xsize := 800;
  2046.             ysize := 600;
  2047.         END;
  2048.         'd' : BEGIN
  2049.             xsize := 1024;
  2050.             ysize := 768;
  2051.         END;
  2052.         'e' : BEGIN
  2053.             xsize := 1280;
  2054.             ysize := 1024;
  2055.         END;
  2056.     END;
  2057.     CASE choice1 OF
  2058.         '1' : mode := FindVesaMode(xsize,ysize,8);
  2059.         '2' : mode := FindVesaMode(xsize,ysize,15);
  2060.         '3' : mode := FindVesaMode(xsize,ysize,16);
  2061.         '4' : mode := FindVesaMode(xsize,ysize,24);
  2062.     END;
  2063.     IF mode = 0 THEN BEGIN
  2064.         WriteLn('No such mode could be found !');
  2065.         WriteLn('Switching to to 320x200.');
  2066.         ReadKey;
  2067.         mode := V320x200x256;
  2068.     END;
  2069. END;
  2070.  
  2071. begin { program body }
  2072.   SelectMode;
  2073.   Initialize;
  2074.   ReportStatus;
  2075.  
  2076. {  AspectRatioPlay; }
  2077.   FillEllipsePlay;
  2078.   SectorPlay;
  2079.   WriteModePlay;
  2080.  
  2081.   ColorPlay;
  2082.   { PalettePlay only intended to work on these drivers: }
  2083.   if (GraphDriver = EGA) or
  2084.       (GraphDriver = EGA64) or
  2085.       (GraphDriver = VGA) then
  2086.      PalettePlay;
  2087.   PutPixelPlay;
  2088. {  PutImagePlay; }
  2089.   RandBarPlay;
  2090.   BarPlay;
  2091.   Bar3DPlay;
  2092.   ArcPlay;
  2093.   CirclePlay;
  2094.   PiePlay;
  2095.   LineToPlay;
  2096.   LineRelPlay;
  2097. {  LineStylePlay; }
  2098. {  UserLineStylePlay; }
  2099.   TextDump;
  2100.   TextPlay;
  2101.   CrtModePlay;
  2102.   FillStylePlay;
  2103.   FillPatternPlay;
  2104.   PolyPlay;
  2105.   SayGoodbye;
  2106. {  CloseGraph; }
  2107.   CloseVesa;
  2108. end.
  2109. ***************************************************
  2110.     '* SHOW D2ROTATE (ABOUT THE ORIGIN)
  2111.     '****************************************************************∞╥≤c≤*φè#^│v/╒:j═φ0t+l▓ô"¬"g└≡?%ªêΣ│H╫½╫╜├¿U'╒⌐⌡ ßV?╩¬ujOΦçEZ1∞▐! ▄B╛Σ8║æ]1GlNÜ┐q▌▓;ô$ΦzE<cª*bEô#ä╧ñÅ"∩─LrdaÖ ╠º╫a^¥£å╬1~)@ëÖMδ╫0═6DäFê¬Çv┼ß╨kæpτ╪É)}ª 1w3╤╧ü⌡¥╓h▓╣≈ïÅaÑ[TⁿHqªÉ╝DKÄ─Y-∞tT╤Θ╨º╟╪.*ÇI9lΦ≈{πτcσ$τπßoFr╪╨∩┼╞╟;O2■e²LÜ4^N|╪½ÅO?╔°FOz`╟╟╟'<>>π$πΘù6·Xgî╖│°oîδπGƒd╝▀░?■╪╔_9L ⌡ôⁿq'æO▀ƒn4╔▀╚▄┼3pτ.òO°·}÷╕ⁿ±'æO?ít│!√8ßÑ≤/┐╣p┼≥┘E╦Vox╕cΦé5╟╚º╙$?√$≥ΘZεsî≡åìΓpKù¢ïß X╥ 9╞≈\µk┤O¥_ 5Üö\≤éÄ┌╤A[╤ÿáï┼éNⁿÅu16    g,%hc╙╨cD╨Vï┘R¢öKñR;8εáΣ╢╪ós╤π╡á└èxgzPÄMú╫yαºÉ+σJ¢i+▓â3╥    ═Ñ╙î^ºG▓█πérφçs %#(╗⌠?┼%u8≡6+QÉ))ò)Afw≈╣╪)B&4░åLXV:δät@Å.;5Φf╢Ät┐ΣJ╫─U8úÇ╟éö£╕p╔┴⌠vg╨╬╥é÷╪╣┬ΓI.ç≡^v╤ZΦÇ& ╒┌6ñô6XßNè╡╬E₧Ñ
  2112. kIº╠▄A+╣╥éb²tæ-Y¡½αÑa═uuîÇ╢αêvhuª╡SÅ┤vèùú¥F;p<d⌐/F─d█éT%▓KΦû=q■öI┐ ┐╠6S$▒÷╚ENΩ¥Fû9╔┌R'╝ ╧φ└?g┬j▓0═/b╖₧─mûé╢┌»ÿÄë/·<éò■░╤╟╢├Xσ:╥P3Θ"╬Læsφ░┌öSö!╗¿*mN£WΣÇ£┤~#╗ææ≥RΩóh:à▌.æ≈╕▌v£äàd▒à╒├=░╖π║$howeg*╬    6ù▄ƒô╕φ░Ö╢qΘD>(w@úKεHÆ╛öúΣU
  2113. éÜR╔╤W▄èê 2M%ó.▓SNÖA1ùJE╢║l]▓¿>\%└Å4ßO▄£â⌐& ê/)8vSP▀▓ôⁿææ√ü√ÑÄa⌠â╚4S╓╟P- ?Σá╕▓Næ*q╡UΘ▓≈^ñ·I.rúR&$Y^╚%è≡B┌≈Ceat
  2114.     Color := RandColor;
  2115.     SetColor(Color);
  2116.     SetFillStyle(Random(CloseDotFill)+1, Color);
  2117.     Bar3D(Random(MaxWidth), Random(MaxHeight),
  2118.           Random(MaxWidth), Random(MaxHeight), 0, TopOff);
  2119.   until KeyPressed;
  2120.   WaitToGo;
  2121. end; { RandBarPlay }
  2122.  
  2123. procedure ArcPlay;
  2124. { Draw random arcs on the screen }
  2125. var
  2126.   MaxRadius : word;
  2127.   EndAngle : word;
  2128.   ArcInfo : ArcCoordsType;
  2129. begin
  2130.   MainWindow('Arc / GetArcCoords demonstration');
  2131.   StatusLine('Esc aborts or press a key');
  2132.   MaxRadius := MaxY div 10;
  2133.   repeat
  2134.     SetColor(RandColor);
  2135.     EndAngle := Random(360);
  2136.     SetLineStyle(SolidLn, 0, NormWidth);
  2137.     Arc(Random(MaxX), Random(MaxY), Random(EndAngle), EndAngle, Random(MaxRadius));
  2138.     GetArcCoords(ArcInfo);
  2139.     with ArcInfo do
  2140.     begin
  2141.       Line(X, Y, XStart, YStart);
  2142.       Line(X, Y, Xend, Yend);
  2143.     end;
  2144.   until KeyPressed;
  2145.   WaitToGo;
  2146. end; { ArcPlay }
  2147.  
  2148. procedure PutPixelPlay;
  2149. { Demonstrate the PutPixel and GetPixel commands }
  2150. const
  2151.   Seed   = 1962; { A seed for the random number generator }
  2152.   NumPts = 2000; { The number of pixels plotted }
  2153.   Esc    = #27;
  2154. var
  2155.   I : word;
  2156.   X, Y, Color : word;
  2157.   XMax, YMax  : integer;
  2158.   ViewInfo    : ViewPortType;
  2159. begin
  2160.   MainWindow('PutPixel / GetPixel demonstration');
  2161.   StatusLine('Esc aborts or press a key...');
  2162.  
  2163.   GetViewSettings(ViewInfo);
  2164.   with ViewInfo do
  2165.   begin
  2166.     XMax := (x2-x1-1);
  2167.     YMax := (y2-y1-1);
  2168.   end;
  2169.  
  2170.   while not KeyPressed do
  2171.   begin
  2172.     { Plot random pixels }
  2173.     RandSeed := Seed;
  2174.     I := 0;
  2175.     while (not KeyPressed) and (I < NumPts) do
  2176.     begin
  2177.       Inc(I);
  2178.         PutPixel(Random(XMax)+1, Random(YMax)+1, RandColor);
  2179.     end;
  2180.  
  2181.     { Erase pixels }
  2182.     RandSeed := Seed;
  2183.     I := 0;
  2184.     while (not KeyPressed) and (I < NumPts) do
  2185.     begin
  2186.       Inc(I);
  2187.       X := Random(XMax)+1;
  2188.       Y := Random(YMax)+1;
  2189.       Color := GetPixel(X, Y);
  2190.         if Color = RandColor then
  2191.           PutPixel(X, Y, 0);
  2192.      end;
  2193.   end;
  2194.   WaitToGo;
  2195. end; { PutPixelPlay }
  2196.  
  2197. procedure PutImagePlay;
  2198. { Demonstrate the GetImage and PutImage commands }
  2199.  
  2200. const
  2201.   r  = 20;
  2202.   StartX = 100;
  2203.   StartY = 50;
  2204.  
  2205. var
  2206.   CurPort : ViewPortType;
  2207.  
  2208. procedure MoveSaucer(var X, Y : integer; Width, Height : integer);
  2209. var
  2210.   Step : integer;
  2211. begin
  2212.   Step := Random(2*r);
  2213.   if Odd(Step) then
  2214.     Step := -Step;
  2215.   X := X + Step;
  2216.   Step := Random(r);
  2217.   if Odd(Step) then
  2218.     Step := -Step;
  2219.   Y := Y + Step;
  2220.  
  2221.   { Make saucer bounce off viewport walls }
  2222.   with CurPort do
  2223.   begin
  2224.     if (x1 + X + Width - 1 > x2) then
  2225.       X := x2-x1 - Width + 1
  2226.     else
  2227.       if (X < 0) then
  2228.         X := 0;
  2229.     if (y1 + Y + Height - 1 > y2) then
  2230.       Y := y2-y1 - Height + 1
  2231.     else
  2232.       if (Y < 0) then
  2233.         Y := 0;
  2234.   end;
  2235. end; { MoveSaucer }
  2236.  
  2237. var
  2238.   Pausetime : word;
  2239.   Saucer    : pointer;
  2240.   X, Y      : integer;
  2241.   ulx, uly  : word;
  2242.   lrx, lry  : word;
  2243.   Size      : word;
  2244.   I         : word;
  2245. begin
  2246.   ClearDevice;
  2247.   FullPort;
  2248.  
  2249.   { PaintScreen }
  2250.   ClearDevice;
  2251.   MainWindow('GetImage / PutImage Demonstration');
  2252.   StatusLine('Esc aborts or press a key...');
  2253.   GetViewSettings(CurPort);
  2254.  
  2255.   { DrawSaucer }
  2256.   Ellipse(StartX, StartY, 0, 360, r, (r div 3)+2);
  2257.   Ellipse(StartX, StartY-4, 190, 357, r, r div 3);
  2258.   Line(StartX+7, StartY-6, StartX+10, StartY-12);
  2259.   Circle(StartX+10, StartY-12, 2);
  2260.   Line(StartX-7, StartY-6, StartX-10, StartY-12);
  2261.   Circle(StartX-10, StartY-12, 2);
  2262.   SetFillStyle(SolidFill, MaxColor);
  2263.   FloodFill(StartX+1, StartY+4, GetColor);
  2264.  
  2265.   { ReadSaucerImage }
  2266.   ulx := StartX-(r+1);
  2267.   uly := StartY-14;
  2268.   lrx := StartX+(r+1);
  2269.   lry := StartY+(r div 3)+3;
  2270.  
  2271.   Size := ImageSize(ulx, uly, lrx, lry);
  2272.   GetMem(Saucer, Size);
  2273.   GetImage(ulx, uly, lrx, lry, Saucer^);
  2274. {  PutImage(ulx, uly, Saucer^, XORput);               { erase image }
  2275.  
  2276.   { Plot some "stars" }
  2277.   for I := 1 to 1000 do
  2278.      PutPixel(Random(MaxX), Random(MaxY), RandColor);
  2279.   X := MaxX div 2;
  2280.   Y := MaxY div 2;
  2281.   PauseTime := 70;
  2282.  
  2283.   { Move the saucer around }
  2284.   repeat
  2285. {     PutImage(X, Y, Saucer^, XORput);                 { draw image }
  2286.      Delay(PauseTime);
  2287. {     PutImage(X, Y, Saucer^, XORput);                 { erase image }
  2288.      MoveSaucer(X, Y, lrx - ulx + 1, lry - uly + 1);  { width/height }
  2289.   until KeyPressed;
  2290.   FreeMem(Saucer, size);
  2291.   WaitToGo;
  2292. end; { PutImagePlay }
  2293.  
  2294. procedure PolyPlay;
  2295. { Draw random polygons with random fill styles on the screen }
  2296. const
  2297.   MaxPts = 5;
  2298. type
  2299.   PolygonType = array[1..MaxPts] of PointType;
  2300. var
  2301.   Poly : PolygonType;
  2302.   I, Color : word;
  2303. begin
  2304.   MainWindow('FillPoly demonstration');
  2305.   StatusLine('Esc aborts or press a key...');
  2306.   repeat
  2307.     Color := RandColor;
  2308.     SetFillStyle(Random(11)+1, Color);
  2309.     SetColor(Color);
  2310.     for I := 1 to MaxPts do
  2311.       with Poly[I] do
  2312.       begin
  2313.         X := Random(MaxX);
  2314.         Y := Random(MaxY);
  2315.       end;
  2316.     FillPoly(MaxPts, Poly);
  2317.   until KeyPressed;
  2318.   WaitToGo;
  2319. end; { PolyPlay }
  2320.  
  2321. procedure FillStylePlay;
  2322. { Display all of the predefined fill styles available }
  2323. var
  2324.   Style    : word;
  2325.   Width    : word;
  2326.   Height   : word;
  2327.   X, Y     : word;
  2328.   I, J     : word;
  2329.   ViewInfo : ViewPortType;
  2330.  
  2331. procedure DrawBox(X, Y : word);
  2332. begin
  2333.   SetFillStyle(Style, MaxColor);
  2334.   with ViewInfo do
  2335.     Bar(X, Y, X+Width, Y+Height);
  2336.   Rectangle(X, Y, X+Width, Y+Height);
  2337.   OutTextXY(X+(Width div 2), Y+Height+4, Int2Str(Style));
  2338.   Inc(Style);
  2339. end; { DrawBox }
  2340.  
  2341. begin
  2342.   MainWindow('Pre-defined fill styles');
  2343.   GetViewSettings(ViewInfo);
  2344.   with ViewInfo do
  2345.   begin
  2346.     Width := 2 * ((x2+1) div 13);
  2347.     Height := 2 * ((y2-10) div 10);
  2348.   end;
  2349.   X := Width div 2;
  2350.   Y := Height div 2;
  2351.   Style := 0;
  2352.   for J := 1 to 3 do
  2353.   begin
  2354.     for I := 1 to 4 do
  2355.     begin
  2356.       DrawBox(X, Y);
  2357.       Inc(X, (Width div 2) * 3);
  2358.     end;
  2359.     X := Width div 2;
  2360.     Inc(Y, (Height div 2) * 3);
  2361.   end;
  2362.   SetTextJustify(LeftText, TopText);
  2363.   WaitToGo;
  2364. end; { FillStylePlay }
  2365.  
  2366. procedure FillPatternPlay;
  2367. { Display some user defined fill patterns }
  2368. const
  2369.   Patterns : array[0..11] of FillPatternType = (
  2370.   ($AA, $55, $AA, $55, $AA, $55, $AA, $55 üÖü üÖü  !BBäx!!!BBäx!BBäx"""DDêp""DDêp>"""BBääêp""!"BDäêêp>IÉÆ|      ° @≥î>00>><Dêx  !BBäx""DDêp&<"DDêê&22TTêêê$> $< @äêp>          ⁿBBBB<  @@Ç****DDDDDDDU¬U¬U¬U¬U¬U¬U¬▌w▌w▌w▌w▌w▌w▌w°°°≥■°°≥≥■≥≥■■°°°    ≤  ≤  ≤≤         °                     ≡≡≡≡≡≡≡≡≡≡≡≡≡≡       ;DDD;    $"Bdÿ>@@@>||>Ac]AAA1N"A""2,  `1NA"*III*<Bü üB<<BüüüB<A" \"QIE" < <BBBB  @@    ~ ?  @ÇB$$B ""A$$"AII6 üBr»$**IIII**ccregion.  The region is defined as any pixel of
  2371.             OldColor which has a path of pixels of OldColor or NewColor
  2372.             with sides touching back to the seed point, (XSeed, YSeed).
  2373.             Therefore, only pixels of OldColor are modified and no other
  2374.             information is changed.
  2375.  
  2376.             SEE ALSO
  2377.  
  2378.             DRWFILLBOX, DRWFILLCIRCLE, DRWFILLELLIPSE, FILLAREA,
  2379.             FILLCONVEXPOLY, FILLPAGE, FILLPOLY, FILLSCREEN, FILLVIEW,
  2380.             SETVIEW
  2381.  
  2382.             EXAMPL(HNxHHO$B<BBBB<$<BBBB<<BBBB<$BBBBBF:0BBBBF:$BBBF:B<""AAA""AAAAA"<B@@B<" <2\A">>xDDxDNDD <` <>BB= > <BBBB< BBBBF:2L\bBBBB&AaQIECA8$>""">0@@A>@@@ b$(. b$(*
  2383.     $    $    $DDDDDDD¬U¬U¬U¬U¬U¬U¬Uw▌w▌w▌w▌w▌w▌w▌°°°⌠ⁿ°°⌠⌠ⁿ⌠⌠ⁿⁿ°°°    ≈  ≈  ≈≈         °                     ≡≡≡≡≡≡≡≡≡≡≡≡≡≡       7HH7"B\DBBRL~BB@@@@@@?R~!!~?DDDD8BBBB|@@Ç>P>III>"AA""AAA"Uw<DDDD86II6"EIQ"\ @@ "AAAAA> >     hH02L2L$$<H(,$<>>>>>>>         VMODE=VIDEOMODEGET
  2384.             IF WHICHVGA = 0 THEN STOP
  2385.             DUMMY=RES640
  2386.             SETVIEW 100, 100, 539, 379
  2387.             FILLVIEW 10
  2388.             WHILE INKEY$ = ""
  2389.             WEND
  2390.             VIDEOMODESET VMODE
  2391.             END
  2392.  
  2393.  
  2394.  
  2395.  
  2396.  
  2397.  
  2398.  
  2399.  
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.                                                                          63
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.           FONTGETINFO
  2415.  
  2416.             PROTOTYPE
  2417.  
  2418.             SUB FONTGETINFO (Width%, Height%)
  2419.  
  2420.             INPUT
  2421.  
  2422.             no input parameters
  2423.     WEND
  2424.             MOUSEEXIT
  2425.             VIDEOMODESET VMODE
  2426.             END
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.  
  2450.  
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.                                                                          86
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.           MOUSECURSORDEFAULT
  2474.  
  2475.             PROTOTYPE
  2476.  
  2477.             SUB MOUSECURSORDEFAULT ()
  2478.  
  2479.             INPUT
  2480.  
  2481.             no input parameters
  2482.  
  2483.             OUTPUT
  2484.  
  2485.             no value returned
  2486.  
  2487.             USAGE
  2488.  
  2489.             MOUSECURSORDEFAULT defines the mouse cursor to be a small
  2490.        ,K$╖┼╘╤░XQ)σ┤ö≡÷┴─┤àñT┘,╘¬àñX9╘⌠àñ\9╘UÜ╢≤`9╘4a╘d9╘UTa╘h9╘ta╘l9╘Uöa╘p9╘┤a╘t┘PT±x┴îÇ╖0▓ïα│ÅαU┤ôα╡ùα╢¢α╖úΓ╘pǺΓ╕¡αë ╚┴πì°sKÉφb<$⌡▌ë     φë φë I1φë  Eφë $YφÆë (mφë ,üφë 0$òφë á⌐φë ñ╜φë I¿╤φë ¼σφë ░∙φÆë 4²ë ┤!²ë ╕$5²ë ╝I²ë └]²ë ⌐8q²ë <àⁿΦiǬ∙PÖÇ ¥Ç
  2491. ⁿ░╨â@%8@ΓΦá╝╤░≡cÑÅ*$░╕≡ż≡τ╥m¿⌡ε    ╨@#µ≈$âh$âαra╨à`¥è∩Ç%Ç +─▀ TîcOî∩â°1<@  [$¿Ç¼ MMl·0ƒ Y¼─!%6a▐è ¥ì ßá+?±  P<îaTTV ╪iÇ¡≥░ `_ñ»%Çá᪠P█º»ε`éa∙É%H«┴íA%Gár∙É
  2492. iw∙Éiφ`╧≥≡╤Çmⁿ▒
  2493. ]ÆAáσw7░⌡∩    $·╟Ç√É&^`  ┐ $ⁿ  $■ $╒ nk$J-ÉQ1£PéBù »0αQ/Ñ4╜£░ºP≈Ñ4Ç⌡$(ª▀$@C]Æé≈└╕_SÇçÑ4=iÉ⌠ä╣<_np@Ñ45ò▒Y3ü¼Qí░.i>╠@5+┴╙É╛╙$@ #┴@«╦
  2494. $╤
  2495. #@Ñú4,p&e÷ü¼_ÇQºÑ4òQ  ü@;¡_áQ@e╠≥@mp!┤a╘O░√`Pñź ÇT°8ÿ!¼Åñ$½╙"q¿ PñCÇ¿α√└╥░eT"ß<p°%Pæ(╧%pδ¥/OêW0Ǽbφ φ B@[â¼8â≥µ≤(    ¿⌡%(Ç∩áTÿp+ óÜ▓0!Σ±(1±░┤ÖÇD└D0Å╡`   $ «îO@╧1
  2496. a╝╤j-0ñ│`@╖bΦaT1═⌠╝╤Σ²¼±,1öíî9lÿ28ÇÅ`Γî¿P²$,N0┴O0a╫δ≤0σú`°î╖#0δ≡└X▄1»Σî(▒¥Ç█Ñ"qá√1CÇú╟╨º Å
  2497. FT Θ²î└1ÇY0    w ²à░$@AÅ`╦Φ¼╘`▄1A  }┐Ç*5 ΩSδδî`¼îaδæ¼î5 1¿⌡Ω╜⌠ ¼¥╬ü└Qî1S╛≤î9╨iÇ,∙PU(}Ç$üÇ àÇ`σìÇ`QαÜBO$%ÿÇ╧"$Ç«Ç]É.┬\`%WÉ$  W0 ÄâO0]αG┬ur╩░£▒Q¢ú╔Ç≡°s?`X0╘`@ µWâ@╣aá εdq`¥9?Ç&+o0µyÄΣAÅuV(7P╬±@IdQ╕@Å┤@;Ç▓?Çò│CÇ┤╟╨╡KÇÄ30ⁿφ° ó╬ì+]Ä╦≡     Mö╝σ ²y5<!└▀óâ╝É3~mp    $<╛≤9Æ-2ⁿ≡@T,╞Σa,)Pæ└¥#¼╪Q┤S(¼@Aîa≡╤@Ö²±⌠KëD─┴▒▀0╨Ñ$╩-0 ╨ê*╙▓edm`î=3Kß-10è=≥≤²└£mîjy ÿe²ⁿ╨i╕e▓ΣmαÖ╢C%Ç*ê*0 EátQZ`mÄLP%    °üⁿªüNQ∙  T¿<qtWΩc z░ÅÇñΩçǪçÇ«;└<┐á¼¥. á?<Σscî)áí := 0;
  2498.       end;
  2499.     end;
  2500.   end;
  2501.   WaitToGo;
  2502. end; { UserLineStylePlay }
  2503.  
  2504.  
  2505. procedure SayGoodbye;
  2506. { Say goodbye and then exit the program }
  2507. var
  2508.   ViewInfo : ViewPortType;
  2509. begin
  2510.   MainWindow('');
  2511.   GetViewSettings(ViewInfo);
  2512.   SetTextStyle(TriplexFont, HorizDir, 4);
  2513.   SetTextJustify(CenterText, CenterText);
  2514.   with ViewInfo do
  2515.     OutTextXY((x2-x1) div 2, (y2-y1) div 2, 'That''s all folks!');
  2516.   StatusLine('Press any key to quit...');
  2517.   repeat until KeyPressed;
  2518. end; { SayGoodbye }
  2519.  
  2520.  
  2521. PROCEDURE SelectMode;
  2522. VAR
  2523.     choice1,choice2     : CHAR;
  2524.    xsize,ysize            : WORD;
  2525. BEGIN
  2526.     (* Let's select a mode *)
  2527.     ClrScr;
  2528.     WriteLn('VESADEMO:');
  2529.     WriteLn('1. 256 colors');
  2530.     WriteLn('2. 32768 colors');
  2531.     WriteLn('3. 65536 colors');
  2532.     WriteLn('4. 16777216 colors');
  2533.     WriteLn('Q uit');
  2534.     WriteLn;
  2535.     Write('Your choice: ');
  2536.     REPEAT
  2537.         ReadLn(choice1);
  2538.       IF choice1 <> '1' THEN BEGIN
  2539.           WriteLn('Sorry !');
  2540.          WriteLn('This demo wasn''t written for more as 256 colors !');
  2541.          WriteLn('You would only get a limited impression of the Hi-& TrueColor modes...');
  2542.          WriteLn('Switching to 256 colors.');
  2543.          choice1 := '1';
  2544.       END;
  2545.     UNTIL choice1 IN ['1'..'4','q'];
  2546.     IF choice1 = 'q' THEN Halt;
  2547.  
  2548.     WriteLn;
  2549.     WriteLn;
  2550.